Copy all the corresponding records.



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

Copy all the corresponding records.

Postby ranga_subham » Fri Jul 18, 2008 8:02 pm

Hi,

We receive a dataset and need to extract data for user.

The user requirement is something like below:

Extract all records if 02 type record contains 123456 in position 55.

The best part of this file is all the type records are actually tagged by a unique number of 7 characters starting in 6th position.

Please help me.

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

Re: Copy all the oorresponding records.

Postby Frank Yaeger » Fri Jul 18, 2008 9:44 pm

I don't understand your requirement. Do you want to extract ALL of the records if any type 02 record contains 123456 starting in position 55, or do you want to extract just the type 02 records containing 123456 starting in position 55, or what?

What is the starting position of the record type field (the '02' field).

Please show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of all relevant fields.

The best part of this file is all the type records are actually tagged by a unique number of 7 characters starting in 6th position.


What is the relevance of that to your requirement?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Copy all the corresponding records.

Postby ranga_subham » Tue Jul 22, 2008 6:19 pm

Hi, Frank.

Thanks for offering to help.

The input file:

01   ##00365   XT VOLUME                     XXXXXXX9  2008-07-21-23.08.43.24945
02   ##00365   12CTS   2008    000001118861200001000001234561200000FLSRP 6DM69 
03   ##00365   XX XXXXXXX XXXXX SXXXXXXX     3 XAXIVXL DXTXE                   
07   ##00365       1     FNAH8 FNAL0 FNAL2 FNAP9 FNAQ9 FNAT8 FNA45 FNB0U OYB19 F
08   ##00365   1002                                                             
14   ##00365   10001002                                                         
19   ##00365   ....................O...                                         
99   ##00365                                                                   
01   ##00034   XT VOLUME                     XXXXXXX9  2008-07-21-23.08.43.24945
02   ##00034   11LUCERN2008    000002102751100001000001112131100000FDRRP 4HD69 
03   ##00034   JAMKIRKIRK VENT-X-BOX         1234 X VTTO XR                     
07   ##00034       1     FNAH8 FNAP8 FNA51 FNB0Q FNCJ2 OYC1U OYFE9 FNFLT FNKA1 O
08   ##00034   1002                                                             
14   ##00034   10001002                                                         
19   ##00034   ....................O...                                         
99   ##00034                                                                   
01   ##00384   XT VOLUME                     XXXXXXX9  2008-07-21-23.08.43.24945
02   ##00384   12CTS   2008    000002233841200001000001234561200000FLSRP 6DM69 
03   ##00384   XT FISHERL MANOT SVUJACTL     3 XADITVL BRIDE                   
07   ##00384       1     FNAH8 FNAL0 FNAL2 FNAP9 FNAQ9 FNAT8 FNA45 FNB0U OYB19 F
08   ##00384   1002                                                             
14   ##00384   10001002                                                         
19   ##00384   ....................O...                                         
99   ##00384                                                                   


The output should have only these records:

01   ##00365   XT VOLUME                     XXXXXXX9  2008-07-21-23.08.43.24945
02   ##00365   12CTS   2008    000001118861200001000001234561200000FLSRP 6DM69 
03   ##00365   XX XXXXXXX XXXXX SXXXXXXX     3 XAXIVXL DXTXE                   
07   ##00365       1     FNAH8 FNAL0 FNAL2 FNAP9 FNAQ9 FNAT8 FNA45 FNB0U OYB19 F
08   ##00365   1002                                                             
14   ##00365   10001002                                                         
19   ##00365   ....................O...                                         
99   ##00365                                                                   
01   ##00384   XT VOLUME                     XXXXXXX9  2008-07-21-23.08.43.24945
02   ##00384   12CTS   2008    000002233841200001000001234561200000FLSRP 6DM69 
03   ##00384   XT FISHERL MANOT SVUJACTL     3 XADITVL BRIDE                   
07   ##00384       1     FNAH8 FNAL0 FNAL2 FNAP9 FNAQ9 FNAT8 FNA45 FNB0U OYB19 F
08   ##00384   1002                                                             
14   ##00384   10001002                                                         
19   ##00384   ....................O...                                         
99   ##00384                                                                   


In the above output file, the '02' type record has got '123456' at position 55. And, all it's other corresponding records are actually tagged with same number for all type records. The tagged number can be found in position 6 on each record.

Please let me know if you need any other info.

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

Re: Copy all the corresponding records.

Postby Frank Yaeger » Tue Jul 22, 2008 9:26 pm

Here's a DFSORT/ICETOOL job that will do what you asked for:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//OUT1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL FNAMES=OUT1,
    INCLUDE=(1,2,CH,EQ,C'02',AND,55,6,CH,EQ,C'123456'),
    OVERLAY=(81:C'BB')
  OUTFIL FNAMES=OUT2,OVERLAY=(81:C'VV')
/*
//S2    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//CON DD DSN=&&T1,DISP=(OLD,PASS)
//    DD DSN=&&T2,DISP=(OLD,PASS)
//OUT DD DSN=...  output file (FB/80)
//TOOLIN DD *
SPLICE FROM(CON) TO(OUT) ON(6,6,CH) -
  WITHALL WITH(1,81) USING(CTL1)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(81,2,CH,EQ,C'VB'),
    BUILD=(1,80)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Copy all the corresponding records.

Postby ranga_subham » Thu Jul 24, 2008 6:06 pm

Frank,

Thank you for the solution you have given.

I tried to tailor it to suit SYNCSORT but could not succeed.

I request a SYNCSORT version of this from experts of this forum.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Copy all the corresponding records.

Postby Alissa Margulies » Fri Jul 25, 2008 2:44 am

Ranga_Subham,

This application should be able to run on SyncSort for z/OS 1.2.1 or later without any modifications.
What did you change?
Which release of SyncSort is installed in your shop?
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: Copy all the corresponding records.

Postby ranga_subham » Fri Jul 25, 2008 6:46 pm

Alissa, I have changed it because it was suggested for DFSORT and we run for SYNCSORT.

Our SYNCSORT version is "SYNCSORT FOR Z/OS 1.2.2.1R"

The changed job:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=MY.INPUT.FILE.NAME,DISP=SHR
//OUT1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//SYSIN    DD    *
  SORT FIELDS=COPY
  OUTFIL FNAMES=OUT1,
    INCLUDE COND=(1,2,CH,EQ,C'02',AND,55,6,CH,EQ,C'123456'),
    OVERLAY=(81:C'BB')
  OUTFIL FNAMES=OUT2,OVERLAY=(81:C'VV')
/*
//S2    EXEC  PGM=SORT
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//CON DD DSN=&&T1,DISP=(OLD,PASS)
//    DD DSN=&&T2,DISP=(OLD,PASS)
//OUT DD DSN=MY.OUTPUT.FILE.NAME,DISP=SHR
//TOOLIN DD *
SPLICE FROM(CON) TO(OUT) ON(6,6,CH) -
  WITHALL WITH(1,81) USING(CTL1)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE COND=(81,2,CH,EQ,C'VB'),
    BUILD=(1,80)
/*


Did i do something wrong?

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

Re: Copy all the corresponding records.

Postby ranga_subham » Fri Jul 25, 2008 6:59 pm

Alissa, I ran the job as it is provided by Frank upon your suggestion and got the below errors:

WER247A  OUT      HAS INCOMPATIBLE LRECL                     
WER425A  CONVERT FEATURE CANNOT BE USED WITH OVERLAY OR IFTHEN
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                 


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

Re: Copy all the corresponding records.

Postby Alissa Margulies » Fri Jul 25, 2008 8:21 pm

SyncSort ships with an alias of ICEMAN. ICETOOL is also a valid alias for SYNCTOOL. However, since you've already modified the program names, you can simply change your S2 step to specify PGM=SYNCTOOL instead of PGM=SORT. Let me know if you still encounter difficulties.
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: Copy all the corresponding records.

Postby ranga_subham » Mon Jul 28, 2008 2:55 pm

Alissa,

Below given is the error it shows:

SYSIN :                                                     
  SORT FIELDS=COPY                                           
  OUTFIL FNAMES=OUT1,                                       
    INCLUDE COND=(1,2,CH,EQ,C'02',AND,55,6,CH,EQ,C'123456'),
           *                                                 
    OVERLAY=(1049:C'BB')                                     
    *                                                       
  OUTFIL FNAMES=OUT2,OVERLAY=(1049:C'VV')                   
WER268A  OUTFIL STATEMENT  : SYNTAX ERROR                   
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT             
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE               


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

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post