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: 5
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 come and go, but JCL stays forever.
User avatar
sergeyken
 
Posts: 244
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 5 times
Been thanked: 21 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: 5
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 come and go, but JCL stays forever.
User avatar
sergeyken
 
Posts: 244
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 5 times
Been thanked: 21 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 come and go, but JCL stays forever.
User avatar
sergeyken
 
Posts: 244
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 5 times
Been thanked: 21 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: 5
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 come and go, but JCL stays forever.
User avatar
sergeyken
 
Posts: 244
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 5 times
Been thanked: 21 times

Re: hold records temporarily?

Postby jamas001 » Thu Dec 09, 2021 8:20 pm

no one was asking for 'do-my-job-for-me"...

and thank you for providing a perfect example of what is wrong with "help" forums and most customer support nowadays, where the prevalent attitude is a holier-than-thou one instead of a genuine desire to help others out. "lets show my superior intellect by providing a couple of cryptic responses" instead of an explanation as to why those are the "correct" responses... sigh

I've since found another site that has been more helpful and truly interested in helping out, so you can walk away from this post... pat yourself on the back for another job well done!!!
jamas001
 
Posts: 5
Joined: Wed Dec 08, 2021 3:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: hold records temporarily?

Postby jamas001 » Thu Dec 09, 2021 9:10 pm

"You are extremely rude, and lazy, too.

You have been provided with detailed hints: what is the way of doing your task using the SORT tools, with specific statements, and specific parameters. All your responses demonstrated clearly, that you have not a minor idea about ANY of this utility options. Instead of start to learn what is missing from your understanding you began a rude and frustrating discussion.

What you demand from others is exactly: do-my-job-for-me request. Others have spent their time to learn carefully what you hate to learn. There is absolutely nothing of “cryptic messages” for those who is able to do a job on his own. You prefer to steal the results begging them from others. In a very rude manner"

sigh....
jamas001
 
Posts: 5
Joined: Wed Dec 08, 2021 3:59 am
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post