IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort and merge of group of files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Tue Jul 17, 2007 3:57 pm
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: 3156
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:04 pm
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
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: 3156
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 4:35 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top