I got a problem about using sort utility to generate a report,here is my situation:
I have a VSAM file with 640 record length.I want to copy some fields to a sequential file,like below:
//STEP010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=DRCMV.EDQRDEV.EDQSY0F,DISP=SHR
//SORTOUT DD DSN=C210163.OUTFILE(+1),DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(10,10)),DCB=(LRECL=140,BLKSIZE=1400,RECFM=FB)
//SYSIN DD *
SORT FIELDS=COPY
INREC FIELDS=(1:198,44,50:62,8,60:43,7,70:61,1,85:58,3,100:70,3)
/*
E RECORD TYPE IS F - DATA STARTS IN POSITION 1
0 103 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 140 BYTE LRECL FOR OUTFIL
0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 EE-BASE E9-K90007 E7-K24705
3 END OF DFSORT
ICE222A n BYTE FIXED RECORD LENGTH IS NOT EQUAL TO m BYTE LRECL FOR ddname
Explanation: Critical. The LRECL specified or retrieved for the
fixed-length OUTFIL data set was not equal to the computed length of the
output records for that data set. You cannot use the LRECL value to pad
the OUTFIL records or to truncate the records produced by OUTREC parameter
processing. The values shown in the message are as follows:
- n is the computed length of the output records for the OUTFIL group
- m is the specified or retrieved LRECL of the OUTFIL data set
- ddname indicates the OUTFIL data set for which padding or truncation
was required
Programmer Response: Either let DFSORT set the LRECL to the computed
record length, or use the OUTREC operand of the OUTFIL statement to set
the output record length to the specified LRECL. Remember to allow an
extra byte for OUTFIL report data sets (for the ASA carriage control
character).
ICE224A ddname CANNOT BE USED FOR A REPORT - RECFM WITHOUT ’A’ SPECIFIED, OR VSAM DATA SET
Explanation: Critical. The OUTFIL report specified for the OUTFIL data set associated with ddname cannot be produced because either: v the OUTFIL data set is VSAM, or v the record format specified or retrieved for the OUTFIL data set does not contain ’A’ (ANSI carriage control characters).
System action: The program terminates.
Programmer response: If the OUTFIL data set is VSAM, it cannot be used for a report. If the OUTFIL data set is non-VSAM, take one of the following actions: v Let DFSORT set the RECFM appropriately. v Specify a RECFM that includes ’A’. v Specify the REMOVECC parameter on the OUTFIL statement so ’A’ is not needed in the RECFM.
Thanks UmeySan and also krisprems!
Thanks Skolusu!
Because of your help,I got solve this problem and learned a lot.