View previous topic :: View next topic
|
Author |
Message |
senthilmurugan
New User
Joined: 19 Feb 2008 Posts: 15 Location: chennai
|
|
|
|
Code: |
//S010 EXEC PGM=ICEMAN
//SYMNAMES DD *
YR2,S'&YR2'
YR4,S'&YR4'
/*
//SYMNOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
/*
|
and i received the output in SYMNOUT is
Code: |
****** SYMNAMES SYMBOL STATEMENTS ******
YR2,S'&YR2'
YR4,S'&YR4'
********** SYMBOL DEFINITIONS **********
YR2,C'10'
YR4,C'2010'
|
Is it possible to have the value C'2009' in YR4 symbol?
I have tried like..
Code: |
//SYMNAMES DD *
YR4,S'&YR4.-1'
YR4,S'&YR4'-1
YR4,S'&YR4',SUB,+1
YR4,S'&YR4',ADD,-1
YR4,S'&YR4'
/*
|
But failed...
Please give me some ideas...
Actually my file(s) has the value of 2009 and 2010..in some positions...(more than five different layout files)...
I'm planning to use only one SYMNAMES file for it....and using those values in my SORT CARD..? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Is it possible to have the value C'2009' in YR4 symbol? |
The YR4 symbol gives the current year. However, you can dynamically create a YR4 symbol for the (current year - 1) like this:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
YR4,S'&YR4'
//SORTIN DD *
RECORD
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,BUILD=(C'YR4,''',YR4,C'''',80:X)),
IFTHEN=(WHEN=INIT,OVERLAY=(6:6,4,ZD,SUB,+1,EDIT=(TTTT)))
/*
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
...
|
You can then use the dynamically created YR4 symbol for the current year - 1 in step S2. |
|
Back to top |
|
|
|
|