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

Yesterday's Date using SYMNAMES and FINDREP


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

New User


Joined: 16 Apr 2015
Posts: 1
Location: INDIA

PostPosted: Mon Jun 29, 2015 6:59 pm
Reply with quote

Hi All,
I am looking for a way to replace a string "YESTERDAYDATE" by Yesterday's date using FINDREP in my input SMTPDATA . For Current date I was able to achieve this using SYMNAMES , but didn't find way to replace yeseterday's date. Below is what, i tried for Current date
---------------------------------------------------
//SYMNAMES DD *
CRDATE,S'&MON/&DAY/&YR4'
---------------------------------------------------
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FINDREP=(INOUT=(C'CURRENTDATE',CRDATE))
Please suggest me a way to achieve this.
Thanks in advance !!!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jun 29, 2015 9:02 pm
Reply with quote

Not a JCL or VSAM question - moved to DFSort. In future please post questions in the correct forum section.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Tue Jun 30, 2015 10:09 pm
Reply with quote

Here is the code for you. May be Bill Woodger can advise more on optmizing the same.

Code:

//SORT1 EXEC PGM=SORT                                         
//SORTIN DD *                                                 
AAA                                                           
//SYSOUT  DD SYSOUT=*                                         
//SORTOUT DD DSN=&&TEMP,DISP=(,CATLG,DELETE),                 
//           SPACE=(CYL,(1,1),RLSE)                           
//SYSIN DD *                                                   
  SORT FIELDS=COPY                                             
  INREC BUILD=(DATE1(/)-1)                                     
  OUTREC BUILD=(C'RPTDATE,C''',6,3,9,2,5,1,1,4,X'7D',80:X)     
//*                                                           
//SORT2 EXEC PGM=SORT                                         
//SYMNAMES DD DSN=&&TEMP,DISP=SHR                             
//SORTIN DD *                                                 
DATEYESTERDAYDATERANDOMTEST                                   
//SYSOUT  DD SYSOUT=*                                         
//SORTOUT DD SYSOUT=*                                         
//SYSIN DD *                                                   
  SORT FIELDS=COPY                                             
  OUTREC FINDREP=(INOUT=(C'YESTERDAYDATE',RPTDATE))           
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 A Rexx who changes date into a JCL? P... CLIST & REXX 9
No new posts Compare the file record count percent... DFSORT/ICETOOL 4
No new posts Date conversion using SORT SYNCSORT 4
This topic is locked: you cannot edit posts or make replies. Findrep - an identifier to mark the a... SYNCSORT 17
No new posts Date Conversion Y2T to Y2W SYNCSORT 8
Search our Forums:

Back to Top