hold records temporarily?



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

hold records temporarily?

Postby jamas001 » Wed Dec 08, 2021 11:07 pm

looking for a way to stage each record temporarily until a condition with a record is met, then dump that record first and all the remaining records that were stored temporarily once a 2nd condition is met. example input:

record 1
record 2
record 3
member name
record 4
date

desired output:
member name
record 1
record 2
record 3
record 4
date

member name is the first condition to meet, and date is the 'dump all records' trigger... clear as mud?
jamas001
 
Posts: 3
Joined: Wed Dec 08, 2021 3:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: hold records temporarily?

Postby sergeyken » Thu Dec 09, 2021 1:23 pm

1. Learn how to use the CODE tags for your samples of code and data,

2. To “hold temporary” the desired record use
INREC IFTHEN=(WHEN=GROUP,…,PUSH=(…))

3. To change the order of output records use
OUTFIL OMIT=(…),IFTHEN=(WHEN=(…),BUILD=(…,/,…))
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: hold records temporarily?

Postby jamas001 » Thu Dec 09, 2021 6:25 pm

Thanks, I think... no idea what you mean by "code"

I'll see if I can find an explanation of the other statements you mention.
jamas001
 
Posts: 3
Joined: Wed Dec 08, 2021 3:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: hold records temporarily?

Postby sergeyken » Thu Dec 09, 2021 6:59 pm

jamas001 wrote:Thanks, I think... no idea what you mean by "code"

CODE is one of the buttons just above the window where you enter your message.
Click on it before entering any part of your message which represents a program code:
IF A > B
   C = D + 1
END-IF

or a fragment of formatted data:
111111 AAAAAA BBBBBB
000999 XXXXXX ZZZZZZ


If you refuse doing so, many readers would ignore your questions.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: hold records temporarily?

Postby sergeyken » Thu Dec 09, 2021 7:13 pm

jamas001 wrote:You'll see if I can find an explanation of the other statements you mention.

You could easily find the detailed explanation of my “other statements” if you ever opened any manual/reference/schoolbook on any SORT utility.

Without doing so it makes no sense to start coding.
Last edited by sergeyken on Thu Dec 09, 2021 7:20 pm, edited 1 time in total.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: hold records temporarily?

Postby jamas001 » Thu Dec 09, 2021 7:17 pm

wow, so belittling... am so glad I came here for help...

I'm in the manual, and have been for quite some time...

Thanks for nothing...
jamas001
 
Posts: 3
Joined: Wed Dec 08, 2021 3:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: hold records temporarily?

Postby sergeyken » Thu Dec 09, 2021 8:10 pm

jamas001 wrote:Thanks for nothing...

This is a help forum, not do-my-job-for-me forum :?

It’s a shame such responses to the correct answer, which is supposed to teach you thinking by your own, and not just stealing others work.


 INREC IFTHEN=(WHEN=GROUP,
               BEGIN=(1,10,SS,EQ,C’member’),
               PUSH=(81:1,80))
 SORT FIELDS=COPY
 OUTFIL OMIT=(1,80,CH,EQ,81,80,CH),
        REMOVECC,
        IFTHEN=(WHEN=(1,10,SS,EQ,C’record3’),
                BUILD=(1,80,/,81,80)),
        IFTHEN=(WHEN=NONE,
                BUILD=(1,80))
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post