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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
Search our Forums:

Back to Top