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
 

 

Help required in Comparing 3 files and writing 1 output file

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

New User


Joined: 04 May 2007
Posts: 20
Location: INDIA

PostPosted: Fri Apr 18, 2008 4:00 pm    Post subject: Help required in Comparing 3 files and writing 1 output file
Reply with quote

Hi all,

My requirement is: I have three files.
File 1 Layout
School Name 20 bytes
Student Name 12 bytes

File 2 Layout
Student Name 12 bytes
Parent Name 15 bytes

Fille 3 Layout
Parent Name 15 bytes
Address 35 bytes

I need to get in my output file as,
School Name
Student
Parent Name
Address

It is something like using JOINS in DB2. But i need to get this done using a JCL?

Help me out...
Thanks in Advance
M.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Apr 18, 2008 8:07 pm    Post subject: Re: Help required in Comparing 3 files and writing 1 output
Reply with quote

Mahendran3784 wrote:
I need to get in my output file as,
School Name
Student
Parent Name
Address
Assuming the above is a single record, there are many examples showing how to do two files. Once two have been joined to a temp file join it the the third.....
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Fri Apr 18, 2008 9:29 pm    Post subject: Reply to: Help required in Comparing 3 files and writing 1 o
Reply with quote

Mahendran3784,

The following DFSORT/ICETOOL JCL will give you the desired results.

Code:

//STEP0100 EXEC PGM=ICETOOL                                         
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN1      DD *                                                     
SCHOOL NAME 01      STUDENT01                                       
SCHOOL NAME 02      STUDENT02                                       
SCHOOL NAME 03      STUDENT03                                       
SCHOOL NAME 04      STUDENT04                                       
//IN2      DD *                                                     
STUDENT01   PARENT01                                                 
STUDENT02   PARENT02                                                 
STUDENT03   PARENT03                                                 
STUDENT04   PARENT04                                                 
//IN3      DD *                                                     
PARENT01       ADDRESS 01                                           
PARENT02       ADDRESS 02                                           
PARENT03       ADDRESS 03                                           
PARENT04       ADDRESS 04                                           
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(1,1),RLSE)       
//T2       DD DSN=&&T2,DISP=(MOD,PASS),SPACE=(CYL,(1,1),RLSE)       
//OUT      DD SYSOUT=*                                               
//TOOLIN   DD *                                                     
  COPY FROM(IN1) USING(CTL1)                                         
  COPY FROM(IN2) USING(CTL2)                                         
  SPLICE FROM(T1) TO(T2) ON(21,12,CH) WITH(33,15) WITHALL USING(CTL3)
  COPY FROM(IN3) USING(CTL4)                                         
  SPLICE FROM(T2) TO(OUT) ON(33,15,CH) WITH(48,35) WITHALL           
//CTL1CNTL DD *                                                     
  OUTFIL FNAMES=T1,BUILD=(1,32,15X)                                 
//CTL2CNTL DD *                                                     
  OUTFIL FNAMES=T1,BUILD=(21:1,12,33:13,15)                         
//CTL3CNTL DD *                                                     
  OUTFIL FNAMES=T2,BUILD=(1,47,35X)                                 
//CTL4CNTL DD *                                                     
  OUTFIL FNAMES=T2,BUILD=(33:1,15,48:16,35)                         
/*
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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