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

Need mmmyy date format


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RickJensen

New User


Joined: 16 Mar 2023
Posts: 4
Location: United States

PostPosted: Tue Apr 04, 2023 10:34 pm
Reply with quote

At my shop we inherited lots of datasets with the last qualifier as mmmyy like .MAR23. I usually handle the allocation using Rexx but I was thinking that Syncsort might have a way. I also would need to access the previous month since the job runs on the first of the month and uses the previous month for input.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Wed Apr 05, 2023 2:11 am
Reply with quote

The question is about SYNCSORT, which has nothing to do with DSN.
????

Code:
 INREC FINDREP=(INOUT=(C’JAN’,C’01’,
                 . . . . . . . . . . . .
                       C’DEC’,C’12’))
Back to top
View user's profile Send private message
RickJensen

New User


Joined: 16 Mar 2023
Posts: 4
Location: United States

PostPosted: Wed Apr 05, 2023 6:58 am
Reply with quote

Thanks. Thinking that I could perhaps build the dsn from the sort output.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1245
Location: Bamberg, Germany

PostPosted: Wed Apr 05, 2023 10:55 am
Reply with quote

Instead of FINDREP, you can also use BUILD/OVERLAY with CHANGE.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Wed Apr 05, 2023 6:09 pm
Reply with quote

sergeyken wrote:
The question is about SYNCSORT, which has nothing to do with DSN.
????

Code:
 INREC FINDREP=(INOUT=(C’JAN’,C’01’,
                 . . . . . . . . . . . .
                       C’DEC’,C’12’))

For "fool-protection" purposes it could be useful to do it like this:
Code:
 INREC IFTHEN=(WHEN=(3,68,SS,EQ,L(C'DSN=',C'DSNAME=')),
               FINDREP=(INOUT=(C’.JAN’,C’.D01’,
                 . . . . . . . . . . . .
                               C’.DEC’,C’.D12’)))
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1245
Location: Bamberg, Germany

PostPosted: Wed Apr 05, 2023 6:58 pm
Reply with quote

FINDREP is still the musket you are referring to from time to time. A simple CHANGE would be sufficient here.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Wed Apr 05, 2023 7:11 pm
Reply with quote

Joerg.Findeisen wrote:
FINDREP is still the musket you are referring to from time to time. A simple CHANGE would be sufficient here.

CHANGE might be simple when you know for sure the input (sub)field to be updated.
When the whole length of the input line is affected, there is no difference between two of them.

More important is, to restrict updates to only DSNAME= lines.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
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