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
 

 

pass value frm cobol pgm in 1 jcl to anthr cobol in 2nd jcl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
priyanka_cutegal

New User


Joined: 17 Mar 2007
Posts: 1
Location: chennai

PostPosted: Thu Mar 22, 2007 12:51 pm    Post subject: pass value frm cobol pgm in 1 jcl to anthr cobol in 2nd jcl
Reply with quote

I need to pass a value calculated in 1 cobol pgm used in JCL1 to another
cobol program used in JCL2.
Back to top
View user's profile Send private message

Shobana Bhaskar

New User


Joined: 02 Mar 2007
Posts: 35
Location: Pennsylvania, US

PostPosted: Thu Mar 22, 2007 1:27 pm    Post subject:
Reply with quote

if u r executing PGMS in same JCL, you can pass thru Dataset.. Can u give more clarity to ur query???
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Mar 22, 2007 1:32 pm    Post subject:
Reply with quote

Priyanka,

If I got your post correctly, you wanted to pass a value from one job to another job (i.e. both the jobs are noway related). I dont think this is possible, as the resource used by jobs gets released upon completion.


Quote:
you can pass thru Dataset


as suggested by Shobana.

Corrections in this regard are welcome.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Thu Mar 22, 2007 5:46 pm    Post subject:
Reply with quote

If you want to pass a value from a program in job1 to the JCL of job2, here's an example to pass the current date that could be used in a dataset name:

1. in job1, create a file [e.g., a PDS member DSN=TEST.SYMB(DATEMEM)]with the line:
// SET DATENODE=D070322
2. in job2, include the line at the top:
// INCLUDE TEST.SYMB(DATEMEM)
3. in job2, have a line:
//DD1 DD DSN=TEST.DSET.&DATENODE
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Mar 22, 2007 5:54 pm    Post subject:
Reply with quote

Phrzby Phil,

Quote:
1. in job1, create a file [e.g., a PDS member DSN=TEST.SYMB(DATEMEM)]with the line:
// SET DATENODE=D070322
2. in job2, include the line at the top:
// INCLUDE TEST.SYMB(DATEMEM)
3. in job2, have a line:
//DD1 DD DSN=TEST.DSET.&DATENODE


Doesn't this mean you are using dataset for passing the value to job2?
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Thu Mar 22, 2007 5:57 pm    Post subject:
Reply with quote

Yes - just a way to pass data to JCL rather than a program. It seemed a good opportunity to answer a different but related question.
Back to top
View user's profile Send private message
pcoreddy

New User


Joined: 14 Mar 2007
Posts: 24
Location: Mysore

PostPosted: Thu Mar 22, 2007 6:26 pm    Post subject: Re: pass value frm cobol pgm in 1 jcl to anthr cobol in 2nd
Reply with quote

By using Data set u can pass the data form one jcl1 to another Jcl2

whatever the data calculated in Program1 which is executed by JCL1 write into the one o/p dataset

the same data set which is came from JCL1 , u can use as a i/p in the 2nd JCL2 and then use it in program which is executed by Jcl2
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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