View previous topic :: View next topic
|
Author |
Message |
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
Drrr friends,
Is there any way to get the value passed from cobol to jcl???
I know that we can do it by sending the data from cobol to Physical Seq., file and from there to JCL, but I want some other method...
If anybody knows, pls., reply as early as possible...
Reason for asking alternate method...
In my COBOL Program I will dynamically create the dataset using a PROCEDURE IKJEFTSR, So after this creation I must utilise these dataset names in my JCLS.. I wont be knowing the name in which these datasets are created... So I must pass these dataset names to JCL as and when they are created...
I think U all now understood the problem...
So pls. if U have solution...post me...
Thanx,
Srinath |
|
Back to top |
|
|
umeshkmrsh
New User
Joined: 21 Sep 2005 Posts: 79 Location: India
|
|
|
|
What dont you create a JCL at runtime from the program itself once you have created the datasets.
As your requirement needs dynamic JCL so this is the best way out. |
|
Back to top |
|
|
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
No Mr. Umesh,
I cant b'cos, Program will be designed by me but the JCL will be written by somebody else...so thats the prblem....
Srinath |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Write the dataset name to a member of a PDS, then refer to that name in the subsequent job by using an INCLUDE statement in the JCL:
Code: |
JOB1
//JOB1 JOB (....),CLASS=X
//MYPROG1 EXEC MYPROG1
//MYDSN DD DISP=SHR,DSN=MY.PDS(MYDSN)
|
where MY.PDS(MYDSN) is the record:
Code: |
//DDNAME DD DISP=SHR,DSN=MY.DYNAMIC.DATASET
|
Code: |
JOB2
//JOB2 JOB (...),CLASS=X
// JCLLIB ORDER=MY.PDS
//MYPROG2 EXEC PGM=MYPROG2
// INCLUDE MYDSN
|
|
|
Back to top |
|
|
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
Sorry sir... I am not able to get U...
Pls., excuse me....
Srinath |
|
Back to top |
|
|
fixdoubts
New User
Joined: 21 Oct 2005 Posts: 54
|
|
|
|
Hi,
I think he wanted to say that write the filenames u create in the program
into a file and later read this file to get ur file names.
Regards, |
|
Back to top |
|
|
umeshkmrsh
New User
Joined: 21 Sep 2005 Posts: 79 Location: India
|
|
|
|
If this is the case, then you have to use a sequential file as mentioned by Mr. Superk.
Because it is not possible to modify a JCL once it is submitted. You have to write a JCL that creates PDS using COBOL program and then you can modify the second JCL, as mentioned by Mr. Superk. |
|
Back to top |
|
|
|