View previous topic :: View next topic
|
Author |
Message |
phanindra.k
New User
Joined: 26 Nov 2006 Posts: 1 Location: hyderabad
|
|
|
|
Hi,
This is my first post in this forum,
I came across a requirement in my project can u people suggest me?
Requirement:I have to read record length from the sequential file and pass it as a PARM parameter to JCL to create a sequential file of that length. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
You can not do that! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Once your job has gone through the JES converter / interpreter there can be no changes to the executing JCL. You have two options: (1) submit a second job that has the desired JCL parameters in it (which can be done through a utility or COBOL program, or (2) dynamically create the file in the COBOL program using BPXWDYN.
However, if it is a requirement that your COBOL program pass a parameter to another step in the same job to allocate the file, you must go back to whoever gave you the assignment and tell them it cannot be done like that. This was raised as another topic in the last few days, and a forum search will find it for you. But the bottom line is that once the JCL is submitted and the job starts running, it cannot be changed by anybody or anything for any reason whatsoever. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
If you copy the first record of the existing file to an output file (using the sort product), you will have a file of the needed lrecl. . . |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why not just use the LIKE parameter of JCL.
You say that you need to create a file based on the first record length read, and as you have given so very little information, as is usually the case on the forum, I can only assume that this is a file with RECFM=FB.
If the file is VB and the first record read is the shortest in the file ... any suggestions.
You also say create rather than copy. Do you want to populate the new file with data from the base file, or merely create a new file like it. |
|
Back to top |
|
|
|