Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Data from JCL To COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Data from JCL To COBOL
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    Post subject:
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    Post subject: reply to umesh
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

Moderator Team Head


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

PostPosted: Tue Dec 27, 2005 2:47 pm    Post subject: Re: Data from JCL To COBOL
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    Post subject: query
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us