How to bypass register, and maintain it on output



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

How to bypass register, and maintain it on output

Postby ficks » Thu Dec 15, 2011 7:09 pm

Here is the problem:

The file I want to sort has 3 types of records.
If the first byte has value 0, it means a header record.
If the first byte has value 1, it means a value record.
If the first byte has value 3, it means a trailler record.

I need to sort the file, without taking into account header and trailler records.
However, these records should figure in output file, at the first position and last position respectively.

I'll always have a header and a trailler record, and the number of records is variable.

My key is:
OPTION MAINSIZE=32M
SORT FIELDS=(83,8,A),FORMAT=BI

What should I add to the key, to have this behavior?


Thanks!
ficks
 
Posts: 2
Joined: Thu Dec 15, 2011 6:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to bypass register, and maintain it on output

 

Re: How to bypass register, and maintain it on output

Postby NicC » Fri Dec 16, 2011 12:16 am

What 'register'?

How about sorting on your record type ascending as the first sort key and then on your 'real' sort key as the minor sort key?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2702
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: How to bypass register, and maintain it on output

Postby BillyBoyo » Fri Dec 16, 2011 12:44 am

NicC is absolutely right. If your file has been designed correctly, the header/data/trailer indicators will all be in the same place, and will have values in ascending order. Yours fits the bill.

//SYMNAMES DD dsn=hlq.hlq.symnames(memname),disp=shr

where the above member contains:

FILE-RECORD-INDICATOR,1,1,BI  /* Contains 0,1,3
FILE-RECORD-KEY,83,8,BI /* position, length and type of key

//SORTIN DD *
  SORT FIELDS=(FILE-RECORD-INDICATOR,A,
               FILE-RECORD-KEY,A),
               FORMAT=BI


When you run the SORT, the SYMNAMES will be translated into the usual-looking sort cards.

SYMNAMES have a number of advantages. One, for instance, is that you can use the same "datanames" as the programs which might use the file.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: How to bypass register, and maintain it on output

Postby ficks » Fri Dec 16, 2011 1:29 am

Oh, by register I mean record.
I wasn't able to use two sort keys, but now I talked to the adm and it will function.
Thanks!
ficks
 
Posts: 2
Joined: Thu Dec 15, 2011 6:53 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post