Geting error as FIXED RECORD LENGTH IS NOT EQUAL TO LRECL



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

Geting error as FIXED RECORD LENGTH IS NOT EQUAL TO LRECL

Postby Surabhi » Wed Sep 23, 2015 9:24 pm

Hello,

I have a file which contains input as follows:-

#abc#1504#ca56AE56#END#
#xyz#1504#ca564#END#
#abc#1504#ca123#END#
#abc#1504#ca22AE22#END#
#abc#1504#ca248#END#
#xyz#1504#ca56ca56#END#
#abc#1504#caRJAERJ#END#
#abc#1504#ca23AE23#END#

And the required output is---
#abc#1504#ca123#END#
#abc#1504#ca248#END#

This is my job------
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN= input file
// DISP=OLD
//SORTOF01 DD DSN= output file
// DISP=OLD
//SYSIN DD *
OPTION COPY
OUTFIL FILES=01,INCLUDE=((2,3,CH,EQ,C'abc'),AND,(13,3,FS,EQ,NUM)),
PARSE=(%=(ENDBEFR=C'#'),
%=(ENDBEFR=C'#'),
%00=(STARTAFT=C'#',
ENDBEFR=C'#',
FIXLEN=06)),
BUILD=(%00)

/*

And i am geting the below error for that----
6 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 80 BYTE LRECL FOR SORTOF01

Please help me out with this.
Surabhi
 
Posts: 48
Joined: Thu Sep 10, 2015 7:51 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Geting error as FIXED RECORD LENGTH IS NOT EQUAL TO LRECL

 

Re: Geting error as FIXED RECORD LENGTH IS NOT EQUAL TO LRE

Postby BillyBoyo » Wed Sep 23, 2015 10:16 pm

If you want 80-byte records, you have to ensure the BUILD is of 80 bytes.

Easiest way to do this is BUILD=(%00,80X)

That will put a blank in column 80, and pad, with blanks, the intervening data.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Geting error as FIXED RECORD LENGTH IS NOT EQUAL TO LRE

Postby Surabhi » Thu Sep 24, 2015 4:51 pm

Thanks alot it did work with BUILD=(%00,76X)
Surabhi
 
Posts: 48
Joined: Thu Sep 10, 2015 7:51 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Geting error as FIXED RECORD LENGTH IS NOT EQUAL TO LRE

Postby Surabhi » Thu Sep 24, 2015 4:58 pm

i did get the required output as ---
ca123
ca248

but i now i want it as,
present** ca123
present** ca248

how do i add present** before??
Surabhi
 
Posts: 48
Joined: Thu Sep 10, 2015 7:51 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Geting error as FIXED RECORD LENGTH IS NOT EQUAL TO LRE

Postby BillyBoyo » Thu Sep 24, 2015 6:55 pm

 BUILD=(%00,76X)


That puts a named-PARSEd field, which has a FIXLEN (presumably of four) and places 76 blanks.

 BUILD=(%00,80:X)


The puts a named-PARSEd field, which as a FIXLEN, which we don't have to worry about, puts a blank in the 80th position, and fills all intervening positions between the PARSEd field and column 80 with blanks.

The latter is more maintainable. Which we see now:

 BUILD=(C'present**',%00,80:X)


Nothing to do except add the literal.

With the code you have used, you have to count the new characters and adjust the 76. And then change it again when you need the blank before the PARSEd field.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Geting error as FIXED RECORD LENGTH IS NOT EQUAL TO LRE

Postby Surabhi » Thu Sep 24, 2015 8:36 pm

Thanks alot it works :)
Surabhi
 
Posts: 48
Joined: Thu Sep 10, 2015 7:51 pm
Has thanked: 4 times
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post