View previous topic :: View next topic
|
Author |
Message |
archer_denny
New User
Joined: 11 Jun 2009 Posts: 8 Location: Atlanta, GA
|
|
|
|
Is it possible to pass different values thru a variable from multiple JCLs to the Sort Card present in common proc?
Denny
Let me know if you need an example! |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Does using the SYMNAMES DD statement give you what you're looking for? |
|
Back to top |
|
|
archer_denny
New User
Joined: 11 Jun 2009 Posts: 8 Location: Atlanta, GA
|
|
|
|
Using SYMNAMES DD statement not worked for this criteria
Thanks in advance
Denny
Used SYMNAMES DD st to pass Jobname present in JCLs |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Quote: |
Let me know if you need an example! |
An example of what you're trying would probably be useful....
Garry. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The only way I know of to pass data, to be used by a specific program, if that program is not designed to use input parameters from a PARM= statement, from jobs into a common PROC, is to include them in a dataset that the program can access and read. |
|
Back to top |
|
|
archer_denny
New User
Joined: 11 Jun 2009 Posts: 8 Location: Atlanta, GA
|
|
|
|
thanks for imm replies....
My scenario...
JCL's
JCL1 - AAJOB
SET INP-VAR1 = 'ADAY1'
INP-VAR2 = 'AAJOB' (MEANS JOBNAME)
JCL2 - BBJOB
INP-VAR1 = 'BBDY1' (its not typo)
INP-VAR2 = 'BBJOB'
JCL3 - CCJOB
INP-VAR1 = 'CCDY1'
INP-VAR2 = 'CCJOB'
PROC - XXPROC
INPUT FILE - FB/80
DATE JOBNAME
081110 AAAAA
081210 ADAY1
081310 ADAY1
081310 AAJOB
081810 AAJOB
082010 AAJOB
081110 AAAAA
081710 AAJOB
081810 BBJOB
081810 BBDY1
081910 BBDY1
082110 AAAAA
081110 CCDY1
081210 CCDY1
081510 CCDY1
081110 CCCCC
081110 DDDDD
082110 CCJOB
082710 CCJOB
FOR JCL1 - OUTPUT
081210 ADAY1
081310 ADAY1
081310 AAJOB
081810 AAJOB
081810 AAJOB
082010 AAJOB
FOR JCL2 - OUTPUT
081810 BBDY1
081910 BBDY1
081810 BBJOB
FOR JCL3 - OUTPUT
081110 CCDY1
081210 CCDY1
081510 CCDY1
082110 CCJOB
082710 CCJOB
Thanks in advance
Denny |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
That looks like a scenario where Kevin's suggestion to use SYMNAMES would be ideal.
Code: |
//your-procedure PROC THISJOB=
// EXEC DFSORT
//SYMNAMES DD DISP=SHR,DSN=ctrl.card.dataset(&THISJOB)
//*
|
and run your jobs as
Code: |
//AAJOB JOB ......
// EXEC your-procedure,THISJOB=AAJOB
|
&JOB resolves to AAJOB or BBJOB etc
where, say, AAJOB contains
INP_VAR1,C'ADAY1'
INP_VAR2,C'AAJOB'
Garry. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct, 2010), you can use SET and PROC symbols in DFSORT control statements. For example, if you had SET statements like this:
Code: |
// SET INPVAR1='ADAY1'
// SET INPVAR2='AAJOB'
|
or like this
Code: |
// SET INPVAR1='BBDY1'
// SET INPVAR2='BBJOB'
|
or any other values for INPVAR1 and INPVAR2, you could use them in an INCLUDE statement for a DFSORT job like this:
Code: |
//S1 EXEC PGM=SORT,
// PARM='JP1"&INPVAR1",JP2"&INPVAR2"'
//SYSOUT DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INCLUDE COND=(8,5,CH,EQ,JP1,OR,8,5,CH,EQ,JP2)
/*
|
For complete details on the new DFSORT and ICETOOL functions available with the Oct, 2010 PTF, see:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242 |
|
Back to top |
|
|
|