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

Is it possible in jcl to do the following Merge task


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

New User


Joined: 21 Oct 2005
Posts: 5
Location: USA

PostPosted: Wed Dec 21, 2005 5:56 pm
Reply with quote

hi,
Is it possible in jcl to do the following task?

input file1- record

123 ram cbe qw
456 sam chn wq

input file2-record

123 ram cbe mw
456 sam chn sk

The result should be,
123 ram cbe qwmw
456 sam chn wqsk

Thanks and regards,
Selvaganesan
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Dec 21, 2005 6:23 pm
Reply with quote

Refer to the link below....but it'll not squeze the space between merging columns.

http://www-03.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst02.html#t3a

Regards,

Priyesh.
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: Wed Dec 21, 2005 10:03 pm
Reply with quote

Selvaganesan,

Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed that your input files each have RECFM=FB and LRECL=14 and that your output file should have RECFM=FB and LRECL=16. You can change the job appropriately for other attributes.

Code:

//S1   EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN1  DD DSN=...  input file1 (FB/14)
//IN2  DD DSN=...  input file2 (FB/14)
//T1   DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT  DD DSN=...  output file (FB/16)
//TOOLIN   DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(1,12,CH) WITH(15,2)
/*
//CTL1CNTL DD *
  OUTREC OVERLAY=(15:2X)
/*
//CTL2CNTL DD *
  OUTREC OVERLAY=(15:13,2)
/*
Back to top
View user's profile Send private message
selvaganesan

New User


Joined: 21 Oct 2005
Posts: 5
Location: USA

PostPosted: Thu Dec 22, 2005 8:00 am
Reply with quote

Thanks all,
actually we don't know icetool facility in our systems. Please give some other methods that uses ibm utilities to do the above task.

Thanks & regards,
selvaganesan
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: Thu Dec 22, 2005 10:22 pm
Reply with quote

Quote:
actually we don't know icetool facility in our systems. Please give some other methods that uses ibm utilities to do the above task


ICETOOL is an "IBM utility". It's part of DFSORT, an IBM product. ICETOOL has been shipped free with DFSORT since 1991!

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
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 Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Started task using a generation dataset JCL & VSAM 7
This topic is locked: you cannot edit posts or make replies. Merge 2 input files based on the reco... JCL & VSAM 2
No new posts Merge 2 input files after sort SYNCSORT 14
No new posts Batch call online program, EXCI task ... CICS 3
Search our Forums:

Back to Top