SORT assistance for setting up RC
Moderators: Frank Yaeger, Moderator Group
SORT assistance for setting up RC
Hi,
I have a requirement as below.
There is a record of length 7 starting from column 11 with value 9999999.
When I get this record in input file I want to return RC=5 to system.
I tried below but receiving RC=0 and record is captured in output file.
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(11,7,ZD,GT,9999998)
OUTFIL FNAMES=SHOWERR,NULLOFL=RC5
/*
Can anyone assist here? I need to acheive this by using SORT only.
Regards,
Biswa
I have a requirement as below.
There is a record of length 7 starting from column 11 with value 9999999.
When I get this record in input file I want to return RC=5 to system.
I tried below but receiving RC=0 and record is captured in output file.
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(11,7,ZD,GT,9999998)
OUTFIL FNAMES=SHOWERR,NULLOFL=RC5
/*
Can anyone assist here? I need to acheive this by using SORT only.
Regards,
Biswa
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
I'm getting RC=0 always even though OUTFIL is not having any record.
JCL details:
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD 9999999
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(11,7,CH,EQ,C'9999999')
OUTFIL FNAMES=SORTOUT,NULLOFL=RC4
/*
J E S 2 J O B L O G:
PROCSTEP RC
STEP1 00
BROWSE - SYSOUT:
SYSIN :
SORT FIELDS=COPY
OMIT COND=(11,7,CH,EQ,C'9999999')
OUTFIL FNAMES=SORTOUT,NULLOFL=RC4
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER073I SORTIN : DSNAME=UNAYABX.UNAYABX1.JOB58794.D0000101.?
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER074I SORTOUT : DSNAME=UNAYABX.UNAYABX1.JOB58794.D0000104.?
WER055I INSERT 0, DELETE 1
WER405I SORTOUT : DATA RECORDS OUT 0; TOTAL RECORDS OUT 0
WER054I RCD IN 1, OUT 0
WER169I RELEASE 1.4 BATCH 0520 TPF LEVEL 0.1
WER052I END SYNCSORT - UNAYABX1,STEP1,,DIAG=8600,40CA,AA84,00E6,CE6A,68E3,AEC8
JCL details:
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD 9999999
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(11,7,CH,EQ,C'9999999')
OUTFIL FNAMES=SORTOUT,NULLOFL=RC4
/*
J E S 2 J O B L O G:
PROCSTEP RC
STEP1 00
BROWSE - SYSOUT:
SYSIN :
SORT FIELDS=COPY
OMIT COND=(11,7,CH,EQ,C'9999999')
OUTFIL FNAMES=SORTOUT,NULLOFL=RC4
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER073I SORTIN : DSNAME=UNAYABX.UNAYABX1.JOB58794.D0000101.?
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER074I SORTOUT : DSNAME=UNAYABX.UNAYABX1.JOB58794.D0000104.?
WER055I INSERT 0, DELETE 1
WER405I SORTOUT : DATA RECORDS OUT 0; TOTAL RECORDS OUT 0
WER054I RCD IN 1, OUT 0
WER169I RELEASE 1.4 BATCH 0520 TPF LEVEL 0.1
WER052I END SYNCSORT - UNAYABX1,STEP1,,DIAG=8600,40CA,AA84,00E6,CE6A,68E3,AEC8
It might have been helpful if you had mentioned that you were using Syncsort. Anyway, from the manual:
The NULLOFL parameter specifies the action to be taken when any non-SORTOUT OUTFIL
data set contains no data records. NULLOFL is ignored in a BetterGener application.
RC0 The delivered default instructs MFX to issue a return code of 0 if not overridden by
a higher return code set for another reason.
RC4 Instructs MFX to issue a WER461I warning message and continue processing. A
return code of 4 will be issued if not overridden by a higher return code set for
another reason.
RC16 Instructs MFX to issue a WER461A message and to terminate processing with a
return code of 16.
The NULLOFL parameter specifies the action to be taken when any non-SORTOUT OUTFIL
data set contains no data records. NULLOFL is ignored in a BetterGener application.
RC0 The delivered default instructs MFX to issue a return code of 0 if not overridden by
a higher return code set for another reason.
RC4 Instructs MFX to issue a WER461I warning message and continue processing. A
return code of 4 will be issued if not overridden by a higher return code set for
another reason.
RC16 Instructs MFX to issue a WER461A message and to terminate processing with a
return code of 16.
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page