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
 

 

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: 1714
Location: 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: 159
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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get previous month in SYMNAMES Suganya87 SYNCSORT 9 Fri Oct 28, 2016 1:37 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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