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
 

 

Is it possible in jcl to do the following Merge task

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Is it possible in jcl to do the following Merge task
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: 1452
Location: Chicago, IL

PostPosted: Wed Dec 21, 2005 6:23 pm    Post subject: Re: merge
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 Moderator


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

PostPosted: Wed Dec 21, 2005 10:03 pm    Post subject:
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    Post subject: Any other method
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 Moderator


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

PostPosted: Thu Dec 22, 2005 10:22 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 SQL Merge error -254 Robin Sulsona DB2 8 Wed Jun 01, 2016 8:28 pm
No new posts SAS MERGE to DFSORT Musab Ahmed DFSORT/ICETOOL 6 Mon Feb 01, 2016 5:44 pm
No new posts Merge two files having two trailer re... R.Manivannan DFSORT/ICETOOL 7 Wed Nov 25, 2015 9:18 pm
No new posts is there a way to renumber the id in ... boyti ko TSO/ISPF 5 Wed Oct 28, 2015 7:56 am
No new posts Task management through REXX kenshin CLIST & REXX 5 Wed Sep 30, 2015 10:41 pm


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