How to concatenate records from two ps into one ps?

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

nidhi1985
Member
Posts: 14
Joined: Mon Jun 15, 2009 3:40 pm

Post by nidhi1985 » Mon Jun 22, 2009 11:11 pm

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

maheshvamsi
Active Member
Posts: 52
Joined: Wed Mar 25, 2009 11:56 pm
Location: Banglore

Post by maheshvamsi » Mon Jun 22, 2009 11:22 pm

Please Post SYSOUT also.
Thanks

MaheshVamsi

nidhi1985
Member
Posts: 14
Joined: Mon Jun 15, 2009 3:40 pm

Post by nidhi1985 » Mon Jun 22, 2009 11:25 pm

what do u want in sysout

nidhi1985
Member
Posts: 14
Joined: Mon Jun 15, 2009 3:40 pm

Post by nidhi1985 » Mon Jun 22, 2009 11:26 pm

I will execute the same jcl tomorrow and then I will post that sysout also

maheshvamsi
Active Member
Posts: 52
Joined: Wed Mar 25, 2009 11:56 pm
Location: Banglore

Post by maheshvamsi » Tue Jun 23, 2009 8:53 am

Hi Nidhi,

If there are any errors, everyone can see them in sysout only. That is the reason everyone ask to post the sysouts.

Thats why if you post the SYSOUTs it will be easy for everyone.
Thanks

MaheshVamsi

nidhi1985
Member
Posts: 14
Joined: Mon Jun 15, 2009 3:40 pm

Post by nidhi1985 » Tue Jun 23, 2009 11:09 am

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.

maheshvamsi
Active Member
Posts: 52
Joined: Wed Mar 25, 2009 11:56 pm
Location: Banglore

Post by maheshvamsi » Tue Jun 23, 2009 11:52 am

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.
Thanks

MaheshVamsi

skolusu
Member
Posts: 43
Joined: Sat Jul 26, 2008 12:38 am

Post by skolusu » Tue Jun 23, 2009 8:13 pm

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

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)                                           
/*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

nidhi1985
Member
Posts: 14
Joined: Mon Jun 15, 2009 3:40 pm

Post by nidhi1985 » Tue Jun 23, 2009 9:48 pm

Thanx skolusu,
definitely I will try this tomorrow and let u know if I will face some problem after that.
i hope it should work up as thursday i have to show it

nidhi1985
Member
Posts: 14
Joined: Mon Jun 15, 2009 3:40 pm

HI SKOLUSU

Post by nidhi1985 » Wed Jun 24, 2009 12:29 pm

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

skolusu
Member
Posts: 43
Joined: Sat Jul 26, 2008 12:38 am

Post by skolusu » Wed Jun 24, 2009 8:31 pm

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.
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

kuttus
Member
Posts: 1
Joined: Sun Apr 27, 2014 8:04 pm

Post by kuttus » Sun Apr 27, 2014 8:07 pm

Hi...

Can you please explain the logic used to resolve the problem-ie the part from INREC to BUILD???

Thanks in advance!!!!

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sun Apr 27, 2014 11:17 pm

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

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Feb 01, 2016 10:28 pm

<< Content deleted By Admin >>

Post Reply

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



Other References
Mainframe Tools and others