Filling in records instead of spaces!!!



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

Re: Filling in records instead of spaces!!!

Postby BillyBoyo » Sat Jul 28, 2012 10:36 pm

I used this data:

00001234        ERROR1                TYPE OF ERROR
00001234                              ERROR ABOUT
00001234                              TYPE2
                                      ERROR FIELD
00001234                              ERROR DESCRIPTION
00001234                              DESC ENDED
00004567        TYPEN2                TYPE OF ERROR
00004567                              ERROR NAME
                                      TYPE3
00004567                              DESC ENDED
                                      TEST END
99999999


I have then used these:

  INREC IFTHEN=(WHEN=INIT,
                OVERLAY=(61:SEQNUM,8,ZD,
                            RESTART=(1,8))),
                                                   
        IFTHEN=(WHEN=GROUP,
                     BEGIN=(61,8,CH,EQ,C'00000001',
                           AND,1,8,CH,NE,C' '),
                       PUSH=(71:1,8)),
                                                   
        IFTHEN=(WHEN=GROUP,
                     BEGIN=(1,8,CH,EQ,C' '),
                     RECORDS=2,PUSH=(81:1,60,71,8))
                       PUSH=(81:1,60,71,8))


I suggest you run the first and second IFTHENs and see the effects, then run all three.

Then two tasks remain. To remove the records with blanks in the key, and insert, under two different conditions, the new records from those records - one lot now has a key, where bounded by records with a key, and the others do not.

  OUTFIL OMIT=(1,8,CH,EQ,C' '),
                                             
         IFTHEN=(WHEN=(61,8,CH,EQ,C'00000001',
                   AND,81,60,CH,NE,C' ',
                   AND,1,8,CH,EQ,141,8,CH),
                       BUILD=(71,8,89,52,/,
                              1,60)),
                                             
         IFTHEN=(WHEN=(61,8,CH,EQ,C'00000001',
                   AND,81,60,CH,NE,C' ',
                   AND,1,8,CH,NE,141,8,CH),
                       BUILD=(81,60,/,
                              1,60)),
                                             
         IFTHEN=(WHEN=NONE,BUILD=(1,60))


The final IFTHEN is for all records not preceded by a blank key.

This is, lightly, tested with DFSORT.

If you have multiple contiguous blank keys, this will not work.

The output is:

00001234        ERROR1                TYPE OF ERROR   
00001234                              ERROR ABOUT     
00001234                              TYPE2           
00001234                              ERROR FIELD     
00001234                              ERROR DESCRIPTION
00001234                              DESC ENDED       
00004567        TYPEN2                TYPE OF ERROR   
00004567                              ERROR NAME       
00004567                              TYPE3           
00004567                              DESC ENDED       
                                      TEST END         
99999999                                               
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Filling in records instead of spaces!!!

Postby ibmmf4u » Mon Jul 30, 2012 10:11 pm

Hi Bill,

Thanks a lot !!! Its working fine, thanks for enlightening me.

I have a few questions where i shall start a new topic since its slightly different from this.

Thank you once again!!!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Previous

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post