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

SORTing multiple input files with different record length.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Tue Feb 17, 2009 5:25 pm
Reply with quote

Dear Friends,

I have two input files one with the reord length of 130 and the other with the record length of 135. I have to sort these input files and the output file record length needed is 135. How can I do this ? Can this be done using simple SORT utility ?

Thank You in advance.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Feb 17, 2009 5:34 pm
Reply with quote

What are the RECFM of the files.
What are the sort keys of the files.
Back to top
View user's profile Send private message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Tue Feb 17, 2009 5:53 pm
Reply with quote

The RECFM is FB.

and the SORT key is (1,1,A,61,16,A,121,1,A).
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Feb 17, 2009 11:19 pm
Reply with quote

You can use a DFSORT/ICETOOL job like the following:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/130)
//IN2 DD DSN=...  input file2 (FB/135)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/135)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1)
SORT FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(135:X)
/*
//CTL2CNTL DD *
  SORT FIELDS=(1,1,A,61,16,A,121,1,A),FORMAT=BI
/*
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top