View previous topic :: View next topic
|
Author |
Message |
RickJensen
New User
Joined: 16 Mar 2023 Posts: 4 Location: United States
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
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 |
|
|
RickJensen
New User
Joined: 16 Mar 2023 Posts: 4 Location: United States
|
|
|
|
Thanks. Thinking that I could perhaps build the dsn from the sort output. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1335 Location: Bamberg, Germany
|
|
|
|
Instead of FINDREP, you can also use BUILD/OVERLAY with CHANGE. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1335 Location: Bamberg, Germany
|
|
|
|
FINDREP is still the musket you are referring to from time to time. A simple CHANGE would be sufficient here. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
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 |
|
|
|