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

How to use the edited values of SYMNAMES symbols?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
senthilmurugan

New User


Joined: 19 Feb 2008
Posts: 15
Location: chennai

PostPosted: Mon Feb 22, 2010 9:42 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Feb 23, 2010 12:47 am
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top