Output records are from which file - How to know?



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

Output records are from which file - How to know?

Postby ranga_subham » Mon Jul 06, 2009 8:32 pm

Hi,

I have 30 PS files with each file having huge number of records. I need to pull certain records to output file from these 30 input files based on a given criteria. I am able to do it successfully but finding it very difficult to know from which input file these records have come. I tried manual find by opening each file but it is proving very time consuming due to the file size.

Would you please suggest any method using SORT or other utility that gives me a quick solution to this problem :?:

Please help. :? :( :shock:

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

Re: Output records are from which file - How to know?

 

Re: Output records are from which file - How to know?

Postby dick scherrer » Tue Jul 07, 2009 12:09 am

Hello,

If you use a separate copy execution for each file, you could append a "file-id" at the beginning or end of each record to identify the file from which the data was pulled.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Output records are from which file - How to know?

Postby Alissa Margulies » Tue Jul 07, 2009 12:35 am

As Dick had mentioned, if there is no identifying field within the record, then you can pre-process the data sets to add one.
For example, you can use OUTREC to add a corresponding number (01-30) at the end of each record.
//STEP1 EXEC PGM=SORT
//SYSOUT  DD SYSOUT=*
//SORTIN  DD DSN=original.input.file1 (FB/80)
//SORTOUT DD DSN=modified.input.file1 (FB/82)
//SYSIN   DD *
  SORT FIELDS=COPY
  OUTREC OVERLAY=(81:C'01')
/*

For each input data set, change the OVERLAY value (C'02', C'03', ...C'29', C'30').
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: 1 time

Re: Output records are from which file - How to know?

Postby ranga_subham » Tue Jul 07, 2009 4:12 pm

Thank you. So, I will have 30 such steps to apply an identifier on each file. Is not it?

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

Re: Output records are from which file - How to know?

Postby Alissa Margulies » Tue Jul 07, 2009 7:43 pm

Yes, that is correct. Unless you can somehow modify the application that created the file originally to include such an identifier...
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: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post