Page 1 of 1

WIDTH(28) not valid for OCCUR?

Posted: Thu Sep 01, 2011 11:52 pm
by h00ch71
I have this TOOLIN statement to create a file to be used for further processing (ie: not a report). It simply appends the 4 digit record count of each record and keeps only 1 record if duplicate. I want to have the record length set to 28 bytes instead of the default 120 bytes, but the WIDTH option appears to not be accepted? I double-checked in the ICETOOL user guide and WIDTH(n) is shown as a possible option. Any ideas why it would not be working?

Code: Select all

  OCCUR FROM(INPUT) LIST(OUTPUT) ON(1,24,CH) ON(VALCNT,E'9999') -
  NOHEADER NOCC BETWEEN(0) WIDTH(28)
Error:

Code: Select all

            OCCUR FROM(INPUT) LIST(OUTPUT) ON(1,24,CH) ON(VALCNT,E'9999') -
            NOHEADER NOCC BETWEEN(0) WIDTH(28)
                                           $
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER
ICE602I 0 OPERATION RETURN CODE:  12

Posted: Fri Sep 02, 2011 1:02 am
by Frank Yaeger
For OCCUR, the description of WIDTH(n) points to DISPLAY:

WIDTH(n)
See the discussion of this operand on the DISPLAY statement in "DISPLAY Operator" in topic 7.8.

For DISPLAY, the description of WIDTH(n) says:

WIDTH(n)
Specifies the line length and LRECL you want ICETOOL to use for your list data set. If NOCC is not specified, n can be from 121 to 8192. If NOCC is specified, n can be from 121 to 8191.

So WIDTH(n) has a minimum value for n of 121 and 28 is too small.

If you want to truncate the report to 28 bytes, you can use WIDTH(121) and write the report to a temporary data set, and then do a COPY with INREC to truncate it to 28 bytes.

Posted: Fri Sep 02, 2011 1:41 am
by h00ch71
Thanks very much for the quick reply Frank, I'll do that. Is there a reason why 121 was selected as the minimum width? Just curious...

Posted: Fri Sep 02, 2011 2:47 am
by Frank Yaeger
Kind of arbitrary, but FBA/121 was popular for reports way back when. :lol:

Posted: Fri Sep 02, 2011 4:15 am
by h00ch71
I use them newfangled 133 byte reports myself... :o Thanks again

PS - Would be nice if that 121 minimum length restriction was removed some day ;)

Posted: Fri Sep 02, 2011 4:43 am
by Frank Yaeger
WIDTH(133) is allowed - the maximum is 8192.

I'll add lowering the minimum to my list of possible future enhancements, but it's a long list.

Posted: Fri Sep 02, 2011 4:53 am
by h00ch71
Thanks, but for this particular case, I'm not creating a report.

I retire in 20 years, so try to have the change made sometime before then! LOL

Posted: Fri Sep 02, 2011 9:44 pm
by Frank Yaeger
Read "output" for "report".