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: 2141
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: 1335
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: 2141
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: 1335
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: 2141
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 Date format correction using dfsort DFSORT/ICETOOL 3
No new posts Sorting Date Field DFSORT/ICETOOL 4
No new posts CONVERT a given date from UTC TO BST CICS 0
No new posts Pull data using date difference betwe... DB2 6
No new posts CA7 count with DATE variable CA Products 0
Search our Forums:

Back to Top