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

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 1436
Location: Bangalore,India

PostPosted: Thu Mar 22, 2007 1:32 pm
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

Senior Member


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

PostPosted: Thu Mar 22, 2007 5:46 pm
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: 1436
Location: Bangalore,India

PostPosted: Thu Mar 22, 2007 5:54 pm
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

Senior Member


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

PostPosted: Thu Mar 22, 2007 5:57 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


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 Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top