Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort and merge of group of files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Tue Jul 17, 2007 3:57 pm    Post subject: Sort and merge of group of files
Reply with quote

Hi,

I need to sort and merge 100 input files and wirte to single output file.
Is there any other method instead of giving copy from input to temp1 for each and every file.

Code is as follows:
//PRCNAME PROC
//*
//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSPRINT DD SYSOUT=*
//*INPUT FILES
//INPUTA1 DD DSN=INPUT.FILE.A1(0),DISP=SHR
//INPUTA2 DD DSN=INPUT.FILE.A2(0),DISP=SHR
//INPUTA3 DD DSN=INPUT.FILE.A3(0),DISP=SHR
//INPUTA4 DD DSN=INPUT.FILE.A4(0),DISP=SHR
//INPUTA5 DD DSN=INPUT.FILE.A5(0),DISP=SHR
.
.
.
//INPUTZ1 DD DSN=INPUT.FILE.Z1(0),DISP=SHR
//*TEMPORARY FILE
//TEMP1 DD DSN=&&TEMP2,DISP=(MOD,PASS),
// SPACE=(CYL,(100,500)),RECFM=FB,
// UNIT=SYSDA
//*OUTPUT FILE
//OUTPUT DD DSN=OUTPUT.FILE.CODE,
// DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
// RECFM=FB,LRECL=182,
//TOOLIN DD *
COPY FROM(INPUTA1) TO (TEMP1)
COPY FROM(INPUTA2) TO (TEMP1)
COPY FROM(INPUTA3) TO (TEMP1)
COPY FROM(INPUTA4) TO (TEMP1)
COPY FROM(INPUTA5) TO (TEMP1)
...
...
...
COPY FROM(INPUTZ1) TO (TEMP1)
COPY FROM(TEMP1) TO (OUTPUT) USING CTL1
//*
//CTL1CNTL DD *
SORT FIELDS=(157,4,CH,A)
OUTFIL FNAMES=OUTPUT,REMOVECC,
OUTREC=(1:1,182)
//*

I want to know whether there is any option instead of copyings from input to temp1 for each and every input file(I mean the bolded part).
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:04 pm    Post subject:
Reply with quote

I wonder what the concatenation limit is?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jul 17, 2007 4:17 pm    Post subject:
Reply with quote

bhaskar_kanteti
Initially concatenate i/p file's like this,
Code:
//INPUTA1 DD DSN=INPUT.FILE.A1(0),DISP=SHR
//              DD DSN=INPUT.FILE.A2(0),DISP=SHR
//              DD DSN=INPUT.FILE.A3(0),DISP=SHR
//              DD DSN=INPUT.FILE.A4(0),DISP=SHR
//              DD DSN=INPUT.FILE.A5(0),DISP=SHR
.
.
.
//              DD DSN=INPUT.FILE.Z1(0),DISP=SHR

and change your TOOLIN like
Code:
//TOOLIN DD *
COPY FROM(INPUTA1) TO(OUTPUT) USING(CTL1)

also the o/p OUTPUT DD statement should be
Code:
//OUTPUT DD DSN=OUTPUT.FILE.CODE,DISP=MOD


This may work if the you can concatenate 100 DD statements(as William Thompson has pointed)
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:35 pm    Post subject:
Reply with quote

The system can retrieve two or more data sets and process them successively as a single sequential data set. This is called sequential concatenation. The number of data sets that you can concatenate with sequential concatenation is variable. It is governed by the maximum size of the TIOT option. The system programmer controls the TIOT size with the option ALLOCxx member of SYS1.PARMLIB. The smallest TIOT value allows 819 single-unit DD statements or 64 DD statements having the maximum number of units.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us