Syncsort - Copy Record until a condition met !



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

Syncsort - Copy Record until a condition met !

Postby ranga_subham » Tue Nov 25, 2008 7:42 pm

Hi,

How to copy records from an input file until some condition is met? Here I want to copy records till "ERROR - PROCESS CLOSED" is occured.

Input Data:

ERROR - PROCESS CLOSED
RET0 13 001 XXX48   001 N
RET2 13 001 XXY48   002 T
RET9 13 001 XXZ48   001 T
RET8 13 001 XBX48   002 N
RET9 13 001 XYT48   003 N
ERROR - PROCESS CLOSED
RET1 83 001 XXX48   001 N
RET5 83 001 XXY48   002 T
RET7 83 001 XXZ48   001 T
ERROR - PROCESS CLOSED
RET2 10 001 XXX48   001 N
RET6 10 001 XXY48   002 T
RET1 10 001 XBX48   002 N
RET2 10 001 XYT48   003 N


I want to create three files out of it.

File-1:

ERROR - PROCESS CLOSED
RET0 13 001 XXX48   001 N
RET2 13 001 XXY48   002 T
RET9 13 001 XXZ48   001 T
RET8 13 001 XBX48   002 N
RET9 13 001 XYT48   003 N


File-2:

ERROR - PROCESS CLOSED
RET1 83 001 XXX48   001 N
RET5 83 001 XXY48   002 T
RET7 83 001 XXZ48   001 T


File-3:

ERROR - PROCESS CLOSED
RET2 10 001 XXX48   001 N
RET6 10 001 XXY48   002 T
RET1 10 001 XBX48   002 N
RET2 10 001 XYT48   003 N


Please help.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - Copy Record until a condition met !

Postby dick scherrer » Wed Nov 26, 2008 2:18 am

Hello,

Will the file always have exactly 3?

What should happen if there are less or more than 3?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Syncsort - Copy Record until a condition met !

Postby ranga_subham » Wed Nov 26, 2008 3:52 pm

I copy pasted only few from input file as a sample. The file will have not less than 20,000 for any given day.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - Copy Record until a condition met !

Postby dick scherrer » Wed Nov 26, 2008 10:37 pm

Hello,

You cannot create 20,000 files in a run. . .

It is probably time to look for a different approach to the requirement.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Syncsort - Copy Record until a condition met !

Postby Alissa Margulies » Wed Nov 26, 2008 11:21 pm

I agree with Dick.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: Syncsort - Copy Record until a condition met !

Postby ranga_subham » Thu Nov 27, 2008 3:14 pm

Guys, sorry if I have caused any confusion to you !!

The total number of records would be 20,000, I said. :oops: Not the no. of files to be 20,000.......that will be too huge to create with any approach :mrgreen:
The trend of the file has had header records (ERROR - PROCESS CLOSED) anywhere between 15 to 20 at the maximum followed by their detailed records. All put together will form total of 20,000 records. :roll:

Please let me know the approach.

Thank you.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - Copy Record until a condition met !

Postby chandu_rck » Mon Apr 21, 2014 10:17 pm

Hi,
I am looking for answer to the similar question. Is anyone able to answer this? Appreciate your help in advance.

Thanks
Chandrakanth.
chandu_rck
 
Posts: 4
Joined: Mon Apr 21, 2014 10:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Syncsort - Copy Record until a condition met !

Postby BillyBoyo » Mon Apr 21, 2014 10:20 pm

You'll need to ask a new question.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Syncsort - Copy Record until a condition met !

Postby dick scherrer » Mon Apr 21, 2014 10:24 pm

Hello and welcome to the forum,

You need to start a new topic for your question and provide all of the info we will need to help.

Show some sample input and the output you want when this new process is run. Mention the recfm and lrecl of the files and any processing "rules" that need to be followed.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post