rafaelantunes
New User
Joined: 10 May 2007 Posts: 32 Location: Portugal
|
|
|
|
Hi,
I must say that I don't know if it possible, but... let me explain.
I have the following code:
Code: |
//SORT1C EXEC PGM=SORT,PARM='SIZE=MAX'
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=ARQTGCHP.TTG00038,DISP=SHR
//SORTOUT DD DSN=ARQTGCHP.CHPINVAL,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(200,20),RLSE)
//SYSIN DD *
SORT FIELDS=(8,7,A,1,7,A),FORMAT=BI,EQUALS
INCLUDE COND=(114,1,CH,EQ,C'A',AND,((64,2,CH,NE,C'ES', -
AND,64,2,CH,NE,C'RC',AND,64,2,CH,NE,C'RZ', -
AND,64,2,CH,NE,C'SB'), -
OR,(115,10,CH,GT,C'2006-01-01')))
OUTREC FIELDS=(1:1,7,8:8,7,15:C'X')
//* |
What I want to do is put the date "2006-01-01" in another DSN and do something like:
Code: |
...
AND,64,2,CH,NE,C'SB'), -
OR,(115,10,CH,GT,C'&&DSN&&')))
OUTREC FIELDS=(1:1,7,8:8,7,15:C'X') |
The reason is that I will have about 10 separate JCL that will use the same date, although is the user that specifies what date will be. I think it's easier to only change on the new DSN rather that all 10 JCLs.
Is there a similiar solution?
Best regards |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
The easiest way to do this with DFSORT would be to put a record with the date in a data set (let's call it SYMBOL) with RECFM=FB and LRECL=80 like this:
TARG,'2006-01-01'
That would give you a DFSORT symbol in the SYMBOL data set that you could use in your job like this:
Code: |
//SORT1C EXEC PGM=SORT,PARM='SIZE=MAX'
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=SYMBOL,DISP=SHR
...
AND,64,2,CH,NE,C'SB'), -
OR,(115,10,CH,GT,TARG)))
OUTREC FIELDS=(1:1,7,8:8,7,15:C'X')
|
You could then change '2006-01-01' in SYMBOL to whatever you need.
If you only want to put the date in SYMBOL like this:
2006-01-01
then you could use a separate DFSORT step to create the TARG symbol from that record. |
|