WIDTH(28) not valid for OCCUR?

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
h00ch71
Member
Posts: 4
Joined: Thu Sep 01, 2011 9:58 pm

WIDTH(28) not valid for OCCUR?

Post by h00ch71 » Thu Sep 01, 2011 11:52 pm

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

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Fri Sep 02, 2011 1:02 am

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.
Last edited by Frank Yaeger on Fri Sep 02, 2011 4:41 am, edited 1 time in total.
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

h00ch71
Member
Posts: 4
Joined: Thu Sep 01, 2011 9:58 pm

Post by h00ch71 » Fri Sep 02, 2011 1:41 am

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...

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Fri Sep 02, 2011 2:47 am

Kind of arbitrary, but FBA/121 was popular for reports way back when. :lol:
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

h00ch71
Member
Posts: 4
Joined: Thu Sep 01, 2011 9:58 pm

Post by h00ch71 » Fri Sep 02, 2011 4:15 am

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 ;)

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Fri Sep 02, 2011 4:43 am

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.
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

h00ch71
Member
Posts: 4
Joined: Thu Sep 01, 2011 9:58 pm

Post by h00ch71 » Fri Sep 02, 2011 4:53 am

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

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Fri Sep 02, 2011 9:44 pm

Read "output" for "report".
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

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others