Hi,
I require Urgent quick help on below issue:
I want to check for numeric data at 148th position of the file for 2 byte field.
Input file:
COLS> ---4----+----5----+
00001 006102LMADPB
00002 006102LMADPB
00003 006102LMADPB
00004 006102LIT2PB
00005 0061LMADPB 0
00006 0061LMADPB 0
Like the last 2 recs should not be present in the output file. I coded a sort card given below:
//STEP001 EXEC PGM=SORT,REGION=4M
//SORTIN DD DSN=BCST.R554268.ACCOUNTS.TEST1,DISP=SHR
//OUT1 DD DSN=BCST.R554268.OPV,
// UNIT=SYSDA,DISP=(NEW,CATLG,DELETE),
// DCB=(*.SORTIN),SPACE=(CYL,(10,10),RLSE)
//OUT2 DD DSN=BCST.R554268.OPN,
// UNIT=SYSDA,DISP=(NEW,CATLG,DELETE),
// DCB=(*.SORTIN),SPACE=(CYL,(10,10),RLSE)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=OUT1,INCLUDE=(148,2,FS,EQ,NUM)
OUTFIL FNAMES=OUT2,INCLUDE=(148,2,FS,NE,NUM)
//*
but this is not giving me correct results, i am getting all the recs in 1st output file.
I am getting following msg in SYSOUT.
SYSIN :
SORT FIELDS=COPY
OUTFIL FNAMES=OUT1,INCLUDE=(148,2,SS,EQ,NUM)
*
OUTFIL FNAMES=OUT2,INCLUDE=(148,2,SS,NE,NUM)
*
WER253A INCLUDE/OMIT FORMATS INCOMPATIBLE
WER253A INCLUDE/OMIT FORMATS INCOMPATIBLE
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
If this version of DFSORT is not compatible, then Is there any other way with which i can achieve the situation.
Any help will be really appreciated.
Thanks,
Rinil
Not able to do a Numeric check using sort.
Moderators: Frank Yaeger, Moderator Group
If you waqnt urgent hep then a forum is not the place to ask - ask your colleagues. People on forums answer for free, in their own time, if they feel so inclined. I believe most forum rules say that you should avoid posting urgent/asap or whatever. Some people refuse to answer , or deliberatly de;ay answering, when such posts are made.
Regards
Nic
Nic
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
Seems that, your data in the 149th position is SPACE in all the records.? Not sure that caused the records directed to the same outfil.
Please use the CODE tag for projecting your questions better.
Also I have tried it in DFSort and the same was working fine.
OUTFILE1
OUTFILE2
Code: Select all
COLS> ---4----+----5----+
00001 006102LMADPB
00002 006102LMADPB
00003 006102LMADPB
00004 006102LIT2PB
00005 0061LMADPB 0
00006 0061LMADPB 0
Also I have tried it in DFSort and the same was working fine.
Code: Select all
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000010 //SORT1 EXEC PGM=SORT,COND=(4,LE)
000011 //SORTIN DD *
000012 GURUMOORTHYAA
000013 GURUMOORTHYAA
000014 GURUMOORTHY22
000015 GURUMOORTHY01
000016 GURUMOORTHY1
000017 GURUMOORTHYB1
000018 //OUTFILE1 DD SYSOUT=*
000019 //OUTFILE2 DD SYSOUT=*
000020 //SORTOUT DD SYSOUT=*
000021 //SYSIN DD *
000022 OPTION COPY
000023 OUTFIL FNAMES=OUTFILE1,INCLUDE=(12,2,FS,EQ,NUM)
000024 OUTFIL FNAMES=OUTFILE2,INCLUDE=(12,2,FS,NE,NUM)
000025 /*
000026 //SYSOUT DD SYSOUT=*
OUTFILE1
Code: Select all
********************************* TOP OF DATA **********************************
GURUMOORTHY22
GURUMOORTHY01
******************************** BOTTOM OF DATA ********************************
Code: Select all
********************************* TOP OF DATA **********************************
GURUMOORTHYAA
GURUMOORTHYAA
GURUMOORTHY1
GURUMOORTHYB1
******************************** BOTTOM OF DATA ********************************
Guru:-)
You're never fully dressed without a smile
You're never fully dressed without a smile
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Control cards shown are not those which caused the error messages, which show a field-type of SS, for which NUM is not possible.
As Gurugars has shown, I don't see why those control cards would not give you what you want. Since you have mutual exclusion, I'd code the second OUTFIL as SAVE rather than do it by negating the test.
As Gurugars has shown, I don't see why those control cards would not give you what you want. Since you have mutual exclusion, I'd code the second OUTFIL as SAVE rather than do it by negating the test.
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