Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to use the edited values of SYMNAMES symbols?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to use the edited values of SYMNAMES symbols?
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 Moderator


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

PostPosted: Tue Feb 23, 2010 12:47 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us