Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

sorting and formatting two input files (VB format) into o/p

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

New User


Joined: 04 Feb 2008
Posts: 65
Location: Hyd

PostPosted: Thu Dec 11, 2008 6:47 pm    Post subject: sorting and formatting two input files (VB format) into o/p
Reply with quote

Hi,

I have two input files which are in VB format. I need to format those inputs into output file.

Here is the example:
Code:

1(6)          15(4)          21(5)          66(8)
111111        1234           aaaaa          3
222222        4567           bbbbb          5


1(5)           33(4)        39(8)
aaaaa          1234          1
bbbbb          4567          2


Output :


1234  aaaaa    3  1
2222  bbbbb    5  2





Input format is LRECL = 100, RECFM=VB

How can i get the above output using SORT JCL??

Thanks,
Kalyan
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Dec 11, 2008 11:22 pm    Post subject:
Reply with quote

kalyan.v,

Answer the following questions.

1. Do you have duplicates in any of the files? if you have then how do you want to handle them? Show more examples of data

2. What is LRECL of the input files? What do you want the output to be ? A VB or FB file?
Back to top
View user's profile Send private message
kalyan.v

New User


Joined: 04 Feb 2008
Posts: 65
Location: Hyd

PostPosted: Fri Dec 12, 2008 10:05 am    Post subject:
Reply with quote

Hi Skolusu,

Here are the answers for ur questions.

1) There are no duplicates in any of the file.
2)LRECL of the input files is 100.

The output to be in any format VB or FB.

Thanks,
Kalyan
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Dec 12, 2008 10:35 pm    Post subject:
Reply with quote

kalyan.v,

I assumed that you did not consider the RDW when you gave the positions of the fields in the files. ie. you said the keys start 15 for 4 and 21 for 5 bytes in file1. Since it is a vb file , you need to add 4 bytes of rdw which makes the key positions 19 and 25 respectively
Code:

//STEP0100 EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//IN1      DD DSN=your input file 1,DISP=SHR
//IN2      DD DSN=your input file 2,DISP=SHR
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(1,1),RLSE)
//OUT      DD SYSOUT=*                                     
//TOOLIN   DD *                                             
  COPY FROM(IN2) USING(CTL1)                               
  COPY FROM(IN1) USING(CTL2)                               
  SPLICE FROM(T1) TO(OUT) ON(1,10,CH) WITH(19,8)           
//CTL1CNTL DD *                                             
  OUTFIL FNAMES=T1,VTOF,BUILD=(37,4,X,5,5,9X,43,8)         
//CTL2CNTL DD *                                             
  OUTFIL FNAMES=T1,VTOF,BUILD=(19,4,X,25,5,X,70,8,8X)       
/*


The output file is FB and lrecl of 27

Code:

1234 AAAAA        3       1 
4567 BBBBB        5       2 
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 Sorting group data rajella DFSORT/ICETOOL 3 Sun Jan 22, 2017 11:32 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us