View previous topic :: View next topic
|
Author |
Message |
priyanka_cutegal
New User
Joined: 17 Mar 2007 Posts: 1 Location: chennai
|
|
|
|
I need to pass a value calculated in 1 cobol pgm used in JCL1 to another
cobol program used in JCL2. |
|
Back to top |
|
|
Shobana Bhaskar
New User
Joined: 02 Mar 2007 Posts: 35 Location: Pennsylvania, US
|
|
|
|
if u r executing PGMS in same JCL, you can pass thru Dataset.. Can u give more clarity to ur query??? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
pcoreddy
New User
Joined: 14 Mar 2007 Posts: 24 Location: Mysore
|
|
|
|
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 |
|
|
|