How to concatenate records from two ps into one ps?
Moderators: Frank Yaeger, DikDude, Moderator Group
hi everyone
the mainframe I m using is a client product so probably I can't post u all d mainframe screen
But I can tell u the code. The code is as follows:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=U8NG16.FILES.PS,DISP=SHR
// DD DSN=U8NG16.TEMP.PS,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1',SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,SS,EQ,C'1234567890'),
OVERLAY=(46:1,20,01:45X,81:C'2',SEQNUM,8,ZD,RESTART=(81,1)))
SORT FIELDS=(82,8,CH,A),EQUALS
OUTREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(1:1,45))
OUTFIL BUILD=(1,80),OMIT=(81,1,ZD,EQ,1)
/*
//
while submitting the job it gave a u0007 abend
and while doing a jjscan it gave an error
PARAMETER RECORDS IS UNIDENTIFIED
PARAMETER PUSH IS UNIDENTIFIED
Please suggest me some solution as it is very important
and the deadline is wednesday
please help me
the mainframe I m using is a client product so probably I can't post u all d mainframe screen
But I can tell u the code. The code is as follows:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=U8NG16.FILES.PS,DISP=SHR
// DD DSN=U8NG16.TEMP.PS,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1',SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,SS,EQ,C'1234567890'),
OVERLAY=(46:1,20,01:45X,81:C'2',SEQNUM,8,ZD,RESTART=(81,1)))
SORT FIELDS=(82,8,CH,A),EQUALS
OUTREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(1:1,45))
OUTFIL BUILD=(1,80),OMIT=(81,1,ZD,EQ,1)
/*
//
while submitting the job it gave a u0007 abend
and while doing a jjscan it gave an error
PARAMETER RECORDS IS UNIDENTIFIED
PARAMETER PUSH IS UNIDENTIFIED
Please suggest me some solution as it is very important
and the deadline is wednesday
please help me
-
- Active Member
- Posts: 52
- Joined: Wed Mar 25, 2009 11:56 pm
- Location: Banglore
-
- Active Member
- Posts: 52
- Joined: Wed Mar 25, 2009 11:56 pm
- Location: Banglore
Now i am giving you all the sysout file:
1ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS,EXAMP
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01,Z/OS DFSORT V1R5 - 04:25
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1',SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,SS,EQ,C'1234567890'),
OVERLAY=(46:1,20,01:45X,81:C'2',SEQNUM,8,ZD,RESTART=(81,1)))
SORT FIELDS=(82,8,CH,A),EQUALS
OUTREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(1:1,45))
$
ICE007A 0 SYNTAX ERROR
OUTFIL BUILD=(1,80),OMIT=(81,1,ZD,EQ,1)
ICE751I 0 C5-K90007 C7-K90000 C8-K23476 E7-K24705
ICE052I 3 END OF DFSORT
that was the output of my sysout file.
I hope now u all will be able to get my problem and suggest me some alternative solution.
1ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS,EXAMP
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01,Z/OS DFSORT V1R5 - 04:25
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1',SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,SS,EQ,C'1234567890'),
OVERLAY=(46:1,20,01:45X,81:C'2',SEQNUM,8,ZD,RESTART=(81,1)))
SORT FIELDS=(82,8,CH,A),EQUALS
OUTREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(1:1,45))
$
ICE007A 0 SYNTAX ERROR
OUTFIL BUILD=(1,80),OMIT=(81,1,ZD,EQ,1)
ICE751I 0 C5-K90007 C7-K90000 C8-K23476 E7-K24705
ICE052I 3 END OF DFSORT
that was the output of my sysout file.
I hope now u all will be able to get my problem and suggest me some alternative solution.
-
- Active Member
- Posts: 52
- Joined: Wed Mar 25, 2009 11:56 pm
- Location: Banglore
After seeing this I understood that you didnt have latest update.
See below link from Frank:
http://www.mainframegurukul.com/Mainfra ... php?t=3982.
I am also beginer in JCL or Sort. Still I am learning.
Sorry to say this, Please wait till some experts of DFSORT check this link. They only can help you with alternate solution.
See below link from Frank:
http://www.mainframegurukul.com/Mainfra ... php?t=3982.
I am also beginer in JCL or Sort. Still I am learning.
Sorry to say this, Please wait till some experts of DFSORT check this link. They only can help you with alternate solution.
Thanks
MaheshVamsi
MaheshVamsi
nidhi1985,
You are getting an error because you don't have the latest PTF which supports the WHEN=GROUP function. Here is an Alternate version which will run on your system
You are getting an error because you don't have the latest PTF which supports the WHEN=GROUP function. Here is an Alternate version which will run on your system
Code: Select all
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=U8NG16.FILES.PS,DISP=SHR
// DD DSN=U8NG16.TEMP.PS,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(46:20Z,81:C'1',SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,SS,EQ,C'1234567890'),
OVERLAY=(46:1,20,01:45X,81:C'2',SEQNUM,8,ZD,RESTART=(81,1)))
SORT FIELDS=(82,8,CH,A),EQUALS
SUM FIELDS=(46,8,54,8,62,4),FORMAT=BI
OUTFIL BUILD=(1,80)
/*
HI SKOLUSU
hi skolusu,
I tried that jcl but it is giving me the output in following format:
UYTREH.IJHDFTG.GTYHKMN
RETGHB.IUHHHH.UHUHUHH
HUHJHH.UJHJHJU.UHJJHJHJ
2009-05-062009-09-05
2009-04-072009-02-06
2008-10-272009-04-12
AND THE SYOUT FILE IS AS FOLLOWS:
1ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS,EXAMP
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01,Z/OS DFSORT V1R5 - 04:25
INREC IFTHEN=(WHEN=INIT,OVERLAY=(46:20Z,81:C'1',SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,SS,EQ,C'1234567890'),
OVERLAY=(46:1,20,01:45X,81:C'2',SEQNUM,8,ZD,RESTART=(81,1)))
SORT FIELDS=(82,8,CH,A),EQUALS
SUM FIELDS=(46,8,54,8,62,4),FORMAT=BI
OUTFIL BUILD=(1,80)
ICE201I E RECORD TYPE IS F- DATA STARTS IN POSITION 1
ICE7511 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 C9-BASE E5-K35433
ICE1931I 0 ICEAM 1 ENVIROMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 1 U8NG16M.STEP0100. , INPUT LRECL=325,BLKSIZE=27950,TYPE=
ICE093I 0 MAIN STORAGE=(MAX,6291456,6291456)
ICE156I 0 MAIN STORAGE ABOVE 16MB=(6216987,6216987)
ICE127I 0 OPTIONS: OVFLO=RC0,PAD=RC0,TRUNC=RC0,SPANINC=RC16,VLSCMP=N,SZERO=Y, RESET=Y,VSAMENT=Y,DYNSPC=256
ICE128I O OPTIONS: SIZE=6291456, MAXLIM=1048576,MINLIM=450560,EQUALS=Y,LIST=Y,ERET=ABEND,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=Y,RESDNT=ALL,SMF=FULL,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109,CHECK=N,WRKREL=Y,OUTREL=Y,CKPT=
ICE13I 0 OPTIONS: TMAXLIM=6291456 ,ARESALL=0,ARESINV=0,OVRRGN=65536,CINV=Y,CFW=
ICE13I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK
ICE132I 0 OPTIONS: HIPRMAX=0 ,DSPSIZE=MAX,ODMAXBF=2097152,SOLRF=Y,VLLONG=N
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I O EXCP ACCESS METHOD USED FRO SORTIN
ICE750I 0 DC 16000 TC 0 CS DSVNN KSZ 12 VSZ 12
ICE752I 0 FSZ=200 RC IGN=0 E AVG=96 0 WSP=25 C DYN=2 56648
ICE231I 0 STORGAE USED FOR OUTFIL: BELOW 16M = 23552,ABOVE 16M=2146304
ICE210I 0 SORTOUT : EXCP USED,LRECL=80,BLKSIZE=8000,TYPE=FB
ICE751I I1 DE-K24705 D9--24705 CB-K90000 E8-24705
ICE080I 0 IN MAIN STORAGE SORT
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 44, OUT: 44
ICE227I 0 SORTOUT : DELETED=0,REPORT=0,DATA=44
ICE228I 0 SORTOUT : TOTAL IN=44,TOTAL OUT=44
ICE134I 0 NUMBER OF BYTES SORTED:3520
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 15,TRACKS USED:0
ICE199I 0 MEMORY OBJECT STORAGE USED = 0K BYTES
ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES
ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES
ICE052I 3 END OF DFSORT
However I want the output to be in this format:
UYTREH.IJHDFTG.GTYHKMN 2009-05-062009-09-05
RETGHB.IUHHHH.UHUHUHH 2009-04-072009-02-06
HUHJHH.UJHJHJU.UHJJHJHJ 2008-10-272009-04-12
Please suggest me something as thursday I have to show it.
And I have to add two more features in it.
so plz reply as soon as possible
I tried that jcl but it is giving me the output in following format:
UYTREH.IJHDFTG.GTYHKMN
RETGHB.IUHHHH.UHUHUHH
HUHJHH.UJHJHJU.UHJJHJHJ
2009-05-062009-09-05
2009-04-072009-02-06
2008-10-272009-04-12
AND THE SYOUT FILE IS AS FOLLOWS:
1ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS,EXAMP
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01,Z/OS DFSORT V1R5 - 04:25
INREC IFTHEN=(WHEN=INIT,OVERLAY=(46:20Z,81:C'1',SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,SS,EQ,C'1234567890'),
OVERLAY=(46:1,20,01:45X,81:C'2',SEQNUM,8,ZD,RESTART=(81,1)))
SORT FIELDS=(82,8,CH,A),EQUALS
SUM FIELDS=(46,8,54,8,62,4),FORMAT=BI
OUTFIL BUILD=(1,80)
ICE201I E RECORD TYPE IS F- DATA STARTS IN POSITION 1
ICE7511 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 C9-BASE E5-K35433
ICE1931I 0 ICEAM 1 ENVIROMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 1 U8NG16M.STEP0100. , INPUT LRECL=325,BLKSIZE=27950,TYPE=
ICE093I 0 MAIN STORAGE=(MAX,6291456,6291456)
ICE156I 0 MAIN STORAGE ABOVE 16MB=(6216987,6216987)
ICE127I 0 OPTIONS: OVFLO=RC0,PAD=RC0,TRUNC=RC0,SPANINC=RC16,VLSCMP=N,SZERO=Y, RESET=Y,VSAMENT=Y,DYNSPC=256
ICE128I O OPTIONS: SIZE=6291456, MAXLIM=1048576,MINLIM=450560,EQUALS=Y,LIST=Y,ERET=ABEND,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=Y,RESDNT=ALL,SMF=FULL,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109,CHECK=N,WRKREL=Y,OUTREL=Y,CKPT=
ICE13I 0 OPTIONS: TMAXLIM=6291456 ,ARESALL=0,ARESINV=0,OVRRGN=65536,CINV=Y,CFW=
ICE13I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK
ICE132I 0 OPTIONS: HIPRMAX=0 ,DSPSIZE=MAX,ODMAXBF=2097152,SOLRF=Y,VLLONG=N
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I O EXCP ACCESS METHOD USED FRO SORTIN
ICE750I 0 DC 16000 TC 0 CS DSVNN KSZ 12 VSZ 12
ICE752I 0 FSZ=200 RC IGN=0 E AVG=96 0 WSP=25 C DYN=2 56648
ICE231I 0 STORGAE USED FOR OUTFIL: BELOW 16M = 23552,ABOVE 16M=2146304
ICE210I 0 SORTOUT : EXCP USED,LRECL=80,BLKSIZE=8000,TYPE=FB
ICE751I I1 DE-K24705 D9--24705 CB-K90000 E8-24705
ICE080I 0 IN MAIN STORAGE SORT
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 44, OUT: 44
ICE227I 0 SORTOUT : DELETED=0,REPORT=0,DATA=44
ICE228I 0 SORTOUT : TOTAL IN=44,TOTAL OUT=44
ICE134I 0 NUMBER OF BYTES SORTED:3520
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 15,TRACKS USED:0
ICE199I 0 MEMORY OBJECT STORAGE USED = 0K BYTES
ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES
ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES
ICE052I 3 END OF DFSORT
However I want the output to be in this format:
UYTREH.IJHDFTG.GTYHKMN 2009-05-062009-09-05
RETGHB.IUHHHH.UHUHUHH 2009-04-072009-02-06
HUHJHH.UJHJHJU.UHJJHJHJ 2008-10-272009-04-12
Please suggest me something as thursday I have to show it.
And I have to add two more features in it.
so plz reply as soon as possible
nidhi1985,
Something doesn't add up. Your Sysout shows that your input LRECL is 325 bytes. Are you sure that your input has the Dataset names and dates in pos 1?
Looks there are only 44 records in total from both files.i.e 22 in each file. I am guessing that you forgot to concatenate the second file or your data is not what you have shown . Can you send the files offline to skolusu@us.ibm.com and I will take a look at them.
Something doesn't add up. Your Sysout shows that your input LRECL is 325 bytes. Are you sure that your input has the Dataset names and dates in pos 1?
Looks there are only 44 records in total from both files.i.e 22 in each file. I am guessing that you forgot to concatenate the second file or your data is not what you have shown . Can you send the files offline to skolusu@us.ibm.com and I will take a look at them.
So you want the entire logic, which you could probably discern by reading the manual, for a problem that is almost 5 years old and which, because it is old, should not have been added to? It would not have been so bad if you had at least checked out the manual and then simply posted those bits that you did not understand. It would have been much better if you had started a new topic with your unresolved query.
Regards
Nic
Nic
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