Page 1 of 1

newguy and need help with re-using input file

PostPosted: Mon Apr 05, 2010 10:06 pm
by LPSSJW
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

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

PostPosted: Mon Apr 05, 2010 11:41 pm
by dick scherrer
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.

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

PostPosted: Sun Apr 11, 2010 4:05 am
by LPSSJW
Thanks but I reworked the program.

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

PostPosted: Sun Apr 11, 2010 4:24 am
by dick scherrer
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