Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 attchmvs from rexx subroutine that re... harisukumaran CLIST & REXX 1 Fri Jan 19, 2018 5:29 am
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 1 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us