Beyond maximum record length error



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

Beyond maximum record length error

Postby srrc » Fri Mar 31, 2017 1:33 pm

Dear All,

I am trying to join the data from two datasets using Join Keys and in the output dataset, I need it with Header and am using the following sort card.
----+----1----+----2----+----3----+----4----+----5----+----6----+
JOINKEYS FILES=F1,FIELDS=(1,3,A)
JOINKEYS FILES=F2,FIELDS=(1,3,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F2:57,2,F1:1,14)
SORT FIELDS=COPY
OUTFIL REMOVECC,
HEADER1=(5:'TAR BATCH REPORT',2/,
5:'AS ON ',JP0,3/,
4/,
5:'ATP/RXXMISSION DETAILS',
6/,
1:'ATPO/RXNS',11:'COUNTRY',19:'TOP_DATE ',/,
1:'---------',11:'-------',19:'----------',/)
OUTREC FIELDS=(1:1,3,
11:4,3,
19:9,10)

The output as per reformat is
10XYZ 28.03.2017
 9Y   28.03.2017
  1ZX 28.03.2017

I didnt mention the record length but am getting error as follow:
ICE027A 3 END OF          FIELD BEYOND MAXIMUM RECORD LENGTH


Thanks in advance.
srrc
 
Posts: 13
Joined: Tue Mar 28, 2017 1:43 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Beyond maximum record length error

Postby Robert Sample » Fri Mar 31, 2017 6:39 pm

What do you need help with? The error message is quite clear as to what is wrong. Have you looked at what DFSORT says is the length of your output data set? How does that compare to your SORT control statements?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Beyond maximum record length error

Postby BillyBoyo » Sat Apr 01, 2017 9:56 pm

If you poke the message reference into a web search-engine, you'll get to the description of the message in the IBM Knowledgecentre.

A process of elimination will get you to this:

an OUTFIL field was defined as extending beyond the maximum OUTFIL input record length


And what that means in your case is the you've defined the HEADER1 output as being longer than the input to that OUTFIL processing.

Don't use OUTREC FIELDS, use OUTREC BUILD. Perhaps you can even do everything with OUTFIL BUILD (not OUTFIL OUTREC)?

Confused? That's why you should use BUILD. BUILD is a synonym for FIELDS on INREC and OUTREC and for OUTREC on OUTFIL. If you just use BUILD, I never have to type sentences like the previous two.

However you do it, the length of the record on OUTFIL cannot be shorter than what is created with HEADERn/TRAILERn.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Beyond maximum record length error

Postby srrc » Mon Apr 03, 2017 10:15 am

Dear BillyBoyo,

I have tried OUTFIL BUILD as below

JOINKEYS FILES=F1,FIELDS=(1,3,A)
JOINKEYS FILES=F2,FIELDS=(1,3,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F2:57,2,F1:1,14)
SORT FIELDS=COPY
OUTFIL REMOVECC,
HEADER1=(5:'TAR BATCH REPORT',2/,
5:'AS ON ',JP0,3/,
4/,
5:'ATP/RXXMISSION DETAILS',
6/,
1:'ATPO/RXNS',11:'COUNTRY',19:'TOP_DATE ',/,
1:'---------',11:'-------',19:'----------',/)
OUTFIL BUILD=(3X,4:1,2,7X,
13:4,3,3X,
19:9,10)

But didnt got the desired output.. I am getting output as follow:
TAR BATCH REPORT
AS ON 28.03.2017

ATP/RXXMISSION DETAILS

ATPO/RXNS COUNTRY TOP_DATE
--------- ------- ----------
10BEL 28.03.2017
  9D  28.03.2017
  1RO 28.03.2017

I like to generate the output as below
TAR BATCH REPORT
AS ON 28.03.2017

ATP/RXXMISSION DETAILS

ATPO/RXNS COUNTRY TOP_DATE
--------- ------- ----------
   10       BEL   28.03.2017
    9       D     28.03.2017
            1RO   28.03.2017

please help me with the alignment..

Thanks in advance.
srrc
 
Posts: 13
Joined: Tue Mar 28, 2017 1:43 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Beyond maximum record length error

Postby BillyBoyo » Mon Apr 03, 2017 4:57 pm

You now have two OUTFIL statements for the same file. The second (your BUILD) is being ignored. Put a comma at the end of your first OUTFIL, remove OUTFIL from the BUILD.

You don't need all the column-numbers if you are using X to pad the fields. It's often clearer to use the X, so probably best to just remove the column-numbers form the BUILD.

These users thanked the author BillyBoyo for the post:
srrc (Tue Apr 11, 2017 3:18 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post