DFSORT/OVERLAY/VB RECORD



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

DFSORT/OVERLAY/VB RECORD

Postby kbpraba » Wed Apr 16, 2008 12:31 pm

Hi,

I have Variable length input file which has 4 types of records.
Requirement is to mask some of the fields for type 1 and type 2 record.

used the Overlay command to mask those fields.

type 3 and type 4 records should come exactly as it is there in the input file.

But when compared for alphanumeric fields gets pouplated with low values when there is no value in the input file( i.e) when checked with HEX ON it is not showing anything in the input file, but it is showing low values in the output file.

i hv given the code which is used for the mask field.

//SORT001  EXEC PGM=SORT                                               
//SYSOUT   DD   SYSOUT=*                                               
//SYSPRINT DD   SYSOUT=*                                               
//SORTIN   DD   DSN=Input File,DISP=SHR                 
//SORTOUT  DD   DSN=Output File,                       
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=PERMDB,SPACE=(CYL,(400,100),RLSE),                     
//         DCB=(RECFM=VB,LRECL=882,BLKSIZE=0)                           
//SYSIN    DD   *                                                       
   OPTION COPY                                                           
   OUTREC IFTHEN=(WHEN=(15,1,CH,EQ,X'F1'),                               
                OVERLAY=(337:40X,425:16C'X',445:16C'X',463:420X)),     
        IFTHEN=(WHEN=(15,1,CH,EQ,X'F2'),OVERLAY=(79:420X))             
/*       


Let me know if there is any way where i can exactly copy what is available in the input to the output if the type of record is '3' . Record type is determined by the value stored at 15th position.
kbpraba
 
Posts: 2
Joined: Wed Apr 16, 2008 12:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT/OVERLAY/VB RECORD

 

Re: DFSORT/OVERLAY/VB RECORD

Postby Frank Yaeger » Wed Apr 16, 2008 9:13 pm

If you have short records and use OVERLAY for a field beyond the end of the record, the length of the record will be increased to accomodate that field. For example, if you have a record of 20 bytes and use use OVERLAY=(25:C'1'), the length of the record will be increased to 25 bytes and blank padding will be inserted from position 21-24. I suspect this is what you're describing.

If you want to use OVERLAY such that it doesn't increase the length of the records/pad with blanks, you need to include an appropriate length check in your WHEN condition. Since I don't know exactly what you're doing, I can't give you the exact control statements you need, but it would something like this:

    OUTREC IFTHEN=(WHEN=(15,1,CH,EQ,C'1',AND,1,2,BI,GE,882),
        OVERLAY=(337:40X,425:16C'X',445:16C'X',463:420X)),
      IFTHEN=(WHEN=(15,1,CH,EQ,C'1',AND,1,2,BI,GE,460),
        OVERLAY=(337:40X,425:16C'X',445:16C'X')),
      ...


If that doesn't help, then you need to explain in detail exactly what you're trying to do.
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: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: DFSORT/OVERLAY/VB RECORD

Postby kbpraba » Thu Apr 17, 2008 5:14 pm

Thank you for your reply.

But my query was quite different.

In the input file there are 4 type of records
Say Type 1 has a length of 882
Type 2 has a length of 800
Type 3 has a length of 500
Type 4 has length of 80

When the input file is viewed through File Manager for Type 3 record from position 501 to 882 it was blank (even after specifying Hex On no values were displayed).

We had the sort, overlay conditions only for Type 1 and Type2 records only and no changes for Type 3 and Type 4.

But after executing the sort, when checked in the ouput file through File Manager. For type 3 and type 4 records there were null values from 501 postion for type 3 and from 81 postion for type4 ( when hex on specified the values were '00000000').

Please let me know if any further details are needed.
kbpraba
 
Posts: 2
Joined: Wed Apr 16, 2008 12:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT/OVERLAY/VB RECORD

Postby Frank Yaeger » Fri Apr 18, 2008 12:12 am

What you're saying makes no sense.

For VB records, if type 3 records have a length of 500, then there aren't any characters beyond position 500. So whatever FileAid is showing you for 501-822 is meaningless - those bytes are NOT in the record by definition since the records are only 500 bytes long. DFSORT would not change the type 3 records since you didn't ask it to.
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: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post