IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Data from JCL To COBOL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Tue Dec 27, 2005 2:34 pm
Reply with quote

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 icon_question.gif
Back to top
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Tue Dec 27, 2005 2:38 pm
Reply with quote

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
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Tue Dec 27, 2005 2:43 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Dec 27, 2005 2:47 pm
Reply with quote

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
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Tue Dec 27, 2005 3:06 pm
Reply with quote

Sorry sir... I am not able to get U...
Pls., excuse me....
Srinath
Back to top
View user's profile Send private message
fixdoubts

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Tue Dec 27, 2005 3:57 pm
Reply with quote

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
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Tue Dec 27, 2005 4:10 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top