Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Yesterday's Date using SYMNAMES and FINDREP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Yesterday's Date using SYMNAMES and FINDREP
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: 2224
Location: Hampshire, UK

PostPosted: Mon Jun 29, 2015 9:02 pm    Post subject:
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    Post subject: Reply to: Yesterday's Date using SYMNAMES and FINDREP
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    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 Date insertion returns -180 Raghu navaikulam CICS 1 Mon Jul 29, 2019 5:12 pm
This topic is locked: you cannot edit posts or make replies. Need to write the date at the end of ... Poha Eater DFSORT/ICETOOL 16 Tue Jul 23, 2019 2:33 pm
No new posts SQL to retrieve latest Eff date and then vinu78 DB2 8 Tue Apr 30, 2019 3:45 pm
No new posts how to add date & timestamp to th... dharmaraok DFSORT/ICETOOL 5 Thu Apr 18, 2019 2:45 pm
No new posts HEADER1 with Date arithmetic Martin-2000 DFSORT/ICETOOL 4 Thu Feb 21, 2019 3:24 pm

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