newguy and need help with re-using input file



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

newguy and need help with re-using input file

Postby LPSSJW » Mon Apr 05, 2010 10:06 pm

Hi, my name is Steve and I am from Florida.

All files are FB format.

I am trying to use an input file as a template to create JCL (file 1).

I also have another input file with dataset names only (file 2).

I want to use both to create a file of several JCL steps (jcl file).

Basic process:

read file 2
Read file 1 and write to jcl file.
If "DSN=" found add dsn from file 2 then write to jcl file.
when file 2 EOF STOP.

How to get file 1 to start over from the top to create JCL for the next DSN?

Thanks
LPSSJW
 
Posts: 4
Joined: Mon Apr 05, 2010 9:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: newguy and need help with re-using input file

Postby dick scherrer » Mon Apr 05, 2010 11:41 pm

Hello Steve and welcome to the forum,

How to get file 1 to start over from the top to create JCL for the next DSN?
Read this file into an array and then reposition to the top of the array for each new dsn.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: newguy and need help with re-using input file

Postby LPSSJW » Sun Apr 11, 2010 4:05 am

Thanks but I reworked the program.
LPSSJW
 
Posts: 4
Joined: Mon Apr 05, 2010 9:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: newguy and need help with re-using input file

Postby dick scherrer » Sun Apr 11, 2010 4:24 am

Hello,

Good to hear you have something working - thanks for letting us know :)

Thanks but I reworked the program.
Hopefully, you did not choose to open/close the file over and over as this is usually the worst possible way to solve this type of requirement. If there is a very low number of iterations, this can be ok, but if there is a high number of iterations, this method can "dim the lights". . . :)

Good luck,

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post