[Default] On 2 Sep 2016 13:31:37 -0700, in bit.listserv.ibm-main [email protected] (Frank Swarbrick) wrote:
>That is certainly an interesting trick, and one I can't imagine I will be >using any time soon. Doing a copy to a flat file first is much more straight >forward. But thanks for trying! > A simple COBOL program could do the sort and with appropriate copybooks shouldn't be to hard to code. These days the amount of memory taken by a COBOL program using the SORT verb is trivial compared to the size of the address space. Clark Morris > >Seems to me DFSORT should support the same option that DFSORT/VSE supports, >which is multiple SORTINxx labels, i.e.: > > >//STEP01 EXEC PGM=SORT,COND=(4,LT) >//SORTIN1 DD DSN=&DSNENV..DEMAND.DMDMTC.CICS, >// DISP=SHR >//SORTIN2 DD DSN=&DSNENV..DEMAND.DDGENMT, >// DISP=SHR >// DD DSN=&DSNENV..DEMAND.DRTNMTC, >// DISP=SHR >// DD DSN=&DSNENV..DEMAND.DDMNTXX, >// DISP=SHR >// DD DSN=&DSNENV..DEMAND.DBKPGMT, >// DISP=SHR >// DD DSN=&DSNENV..DEMAND.DDMTCE, >// DISP=SHR >// DD DSN=&DSNENV..DEMAND.DDGMTC, >// DISP=SHR >// DD DSN=&DSNENV..DEMAND.MTCE.SAVE04, >// DISP=SHR >//SORTOUT DD DSN=&DSNENV..DEMAND.DDAMTC, > > >VSE has to support this because there is no such thing as dataset >concatenation in VSE. But it seems "obvious" to me that DFSORT for z/OS >should support this as well in order to allow multiple input files where at >least one is a VSAM file. > > >Just MHO. I'm not going to worry too much about it. Though perhaps I will >open an RFE. > > >Frank > >________________________________ >From: IBM Mainframe Discussion List <[email protected]> on behalf of >Sri h Kolusu <[email protected]> >Sent: Friday, September 2, 2016 1:30 PM >To: [email protected] >Subject: Re: DFSORT mixed VSAM & sequential. > >Frank, > >Thanks for sending the DCB properties of the files involved offline. Based >on the DCB properties here is a DFSORT JOB that will give you the desired >results without having you copy the VSAM cluster to a sequential file. > >We will be using the trick of JOINKEYS where you can have two subtasks >with different files. All we need is an additional indicator at the end. > > >//STEP0100 EXEC PGM=SORT >//SYSOUT DD SYSOUT=* >//INVSAM DD DISP=SHR,DSN=Your Input VSAM Cluster >//* >//INSEQF DD DISP=SHR,DSN=Your Sequential file 1 >// DD DISP=SHR,DSN=Your Sequential file 2 >... >// DD DISP=SHR,DSN=Your Sequential file n >//* >//SORTOUT DD DSN=Your final output file, >// DISP=(NEW,CATLG,DELETE), >// SPACE=(CYL,(X,Y),RLSE) >//* >//SYSIN DD * > OPTION COPY > JOINKEYS F1=INVSAM,FIELDS=(1,10,A,13,4,A,17,4,A,11,2,A,501,1,A) > JOINKEYS F2=INSEQF,FIELDS=(1,10,A,13,4,A,17,4,A,11,2,A,501,1,A) > JOIN UNPAIRED > REFORMAT FIELDS=(F1:1,500,?,F2:1,500) > INREC IFOUTLEN=500, > IFTHEN=(WHEN=(501,1,CH,EQ,C'2'),BUILD=(502,500)) >//* >//JNF1CNTL DD * > RECORD TYPE=F > INREC OVERLAY=(501:C'A') >//JNF2CNTL DD * > INREC OVERLAY=(501:C'B') >//* > >Further if you have any questions please let me know > >Thanks, >Kolusu >DFSORT Development >IBM Corporation > >IBM Mainframe Discussion List <[email protected]> wrote on >09/02/2016 08:35:18 AM: > >> From: Frank Swarbrick <[email protected]> >> To: [email protected] >> Date: 09/02/2016 08:35 AM >> Subject: Re: DFSORT mixed VSAM & sequential. >> Sent by: IBM Mainframe Discussion List <[email protected]> >> >> Ed, there was no response from you in your response below. :-) >> >> ________________________________ >> From: IBM Mainframe Discussion List <[email protected]> on >> behalf of Edward Gould <[email protected]> >> Sent: Thursday, September 1, 2016 9:51 PM >> To: [email protected] >> Subject: Re: DFSORT mixed VSAM & sequential. >> >> > On Aug 31, 2016, at 3:55 PM, Frank Swarbrick >> <[email protected]> wrote: >> > >> > FWIW, here his my example: >> > >> > //STEP00 EXEC PGM=IDCAMS >> > //FILEIN DD DSN=&DSNENV..DEMAND.DMDMTC.CICS, >> > // DISP=SHR >> > //FILEOUT DD DSN=&DSNENV..DEMAND.DMDMTC, >> > // DISP=SHR >> > //SYSIN DD * >> > REPRO INFILE (FILEIN)- >> > OUTFILE (FILEOUT) REUSE >> > //SYSPRINT DD SYSOUT=* >> > //STEP01 EXEC PGM=SORT,COND=(4,LT) >> > //SORTIN DD DSN=&DSNENV..DEMAND.DMDMTC, >> > // DISP=SHR >> > // DD DSN=&DSNENV..DEMAND.DDGENMT, >> > // DISP=SHR >> > // DD DSN=&DSNENV..DEMAND.DRTNMTC, >> > // DISP=SHR >> > // DD DSN=&DSNENV..DEMAND.DDMNTXX, >> > // DISP=SHR >> > // DD DSN=&DSNENV..DEMAND.DBKPGMT, >> > // DISP=SHR >> > // DD DSN=&DSNENV..DEMAND.DDMTCE, >> > // DISP=SHR >> > // DD DSN=&DSNENV..DEMAND.DDGMTC, >> > // DISP=SHR >> > // DD DSN=&DSNENV..DEMAND.MTCE.SAVE04, >> > // DISP=SHR >> > //SORTOUT DD DSN=&DSNENV..DEMAND.DDAMTC, >> > // DISP=SHR >> > //DFSPARM DD * >> > SORT FIELDS=(1,10,PD,A,13,4,PD,A,17,4,PD,A,11,2,PD,A),EQUALS >> > //SYSOUT DD SYSOUT=* >> > >> > >> > ________________________________ >> > From: IBM Mainframe Discussion List <[email protected]> on >> behalf of Sri h Kolusu <[email protected]> >> > Sent: Wednesday, August 31, 2016 12:20 PM >> > To: [email protected] >> > Subject: Re: DFSORT mixed VSAM & sequential. >> > >> > John, >> > >> > As Bill mentioned it is the access methods that is preventing the >> > concatenation of the VSAM files. >> > >> > If you can send your existing job and control cards may be I can >suggest >> > an alternative to copying VSAM to sequential file >> > >> > Thanks, >> > Kolusu >> > DFSORT Development >> > IBM Corporation >> > >> > >> > >> > From: John McKown <[email protected]> >> > To: [email protected] >> > Date: 08/31/2016 08:11 AM >> > Subject: DFSORT mixed VSAM & sequential. >> > Sent by: IBM Mainframe Discussion List ><[email protected]> >> > >> > >> > >> > I can't find a way to do the following. Basically a programmer want to >> > create an output data set which is the sorted input from a sequential >data >> > set and a VSAM file. I don't see any way to do this easily. We plan to >> > unload the VSAM to sequential, then sort it with the other sequential >data >> > set. But that is just more work. I wonder why DFSORT doesn't have a >way to >> > handle this. >> > >> > -- >> > Unix: Some say the learning curve is steep, but you only have to climb >it >> > once. -- Karl Lehenbauer >> > Unicode: http://xkcd.com/1726/ >> > >> > Maranatha! <>< >> > John McKown >> >> >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email to [email protected] with the message: INFO IBM-MAIN >> > > > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to [email protected] with the message: INFO IBM-MAIN > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
