×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

SORTOUT Error

SORTOUT Error

SORTOUT Error

(OP)
Can someone tell me what I have wrong here?
This code works:

CODE

//STEP02  EXEC PGM=SORT
//SORTLIB  DD  DSN=SYS1.SORTLIB,DISP=SHR
//SORTWK01 DD  UNIT=DISK6,SPACE=(CYL,(75,25),RLSE)
//SORTWK02 DD  UNIT=DISK6,SPACE=(CYL,(75,25),RLSE)
//SYSOUT   DD  SYSOUT=X
//SORTIN   DD  DSN=TST1.LVL6.INPUT.FILE.#01,DISP=SHR
//SORTOUT  DD  DSN=TST1.LVL6.OUTPUT.FILE.#02,
//             SPACE=(CYL,(1,5),RLSE),UNIT=SYSDA,
//             DCB=(RECFM=FB,LRECL=04,BLKSIZE=27996),
//             DISP=(,CATLG,DELETE)
//SYSIN    DD  *
   SORT   FIELDS=(20,2,A,18,2,A),FORMAT=BI
   OMIT     COND=(18,2,CH,EQ,C'**')
   OUTFIL FNAMES=SORTOUT,OUTREC=(1:20,2,3:18,2)
/*
//*
However, when I change the output record length to 80, I get an error:

CODE

ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE222A 0 4 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 80 BYTE LRECL FOR SORTOUT
All I want to accomplish is to create an 80 byte record.
What do I have wrong?

Randy

RE: SORTOUT Error

(OP)
    
     Found the answer.

CODE

//SYSIN    DD  *
   SORT   FIELDS=(20,2,A,18,2,A),FORMAT=BI
   OMIT     COND=(18,2,CH,EQ,C'**')
   OUTFIL FNAMES=SORTOUT,OUTREC=(1:20,2,3:18,2,5:C76' ')
 

Randy

RE: SORTOUT Error

you have specified LRECL=04, i.e.  the Logical Record Length is 4, which conflicts with the specified record length of 80.  Change LRECL to 80.  Also, the BLKSIZE must be a multiple of 80.

RE: SORTOUT Error

(OP)

     
     webrabbit:
     Your response does not address the problem.

Quote:

However, when I change the output record length to 80, I get an error:

Randy

RE: SORTOUT Error

First, you should NOT use SORTWK** statements unless you've been specifically directed by IBM or your technical support team to do so. Using them could restrict your ability to properly process your sort using the best resource options.

Second, you NEVER specify DCB parameters on a SORT output DD statement. SORT always uses a dynamic allocation based on the criteria you provide in your control statements. For your job, you should specify the required output LRECL of 80 bytes thus:

OUTFIL FNAMES=SORTOUT,OUTREC=(1:20,2,3:18,2,80:X)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close