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
 

 

Data copy between files

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

New User


Joined: 21 Feb 2007
Posts: 6
Location: Mumbai

PostPosted: Thu Jun 26, 2008 2:07 pm    Post subject: Data copy between files
Reply with quote

I have this requirement like copying data from file 1 (column 1-5) to file 2 (column 10-15). Can anybody please provide a solution for this?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 26, 2008 2:36 pm    Post subject:
Reply with quote

Which utility / program did you envisage using ?

What have you tried yourself and what errors do you need help in resolving ?
Back to top
View user's profile Send private message
HozE

New User


Joined: 21 Feb 2007
Posts: 6
Location: Mumbai

PostPosted: Thu Jun 26, 2008 2:42 pm    Post subject:
Reply with quote

I would be using the sort utility.
However i havent tried it because I dont know the exact syntax that is required for this process.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 26, 2008 2:52 pm    Post subject:
Reply with quote

HozE wrote:
I would be using the sort utility.
However i havent tried it because I dont know the exact syntax that is required for this process.

Sigh ................... How do you think that so many other people get experience in all of these products.

It is the very best way to learn - Trial & Error. How do you think that us oldies managed to find things out long before help forums were readily available on the net ?
Back to top
View user's profile Send private message
HozE

New User


Joined: 21 Feb 2007
Posts: 6
Location: Mumbai

PostPosted: Thu Jun 26, 2008 2:59 pm    Post subject:
Reply with quote

Expat, I totally agree with you...no doubt...u cant run until u learn to walk.

I wud have done some research before posting, but time is not on my side rite now. If you can help, it would really be appreciable.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Jun 26, 2008 5:03 pm    Post subject:
Reply with quote

Hi,

why does it need 6 bytes of output when only five bytes are moved ?

I'm just been picky as I don't think the requestor tried very hard at solving the problem.

Gerry
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 Jun 26, 2008 9:52 pm    Post subject:
Reply with quote

You can use DFSORT control statements like this:

Code:

  OPTION COPY
  INREC BUILD=(c:p,m)



where c is the starting positon in the output file, p is the starting position of the input field and m is the length of the input field. So for example:

Code:

   OPTION COPY
   INREC BUILD=(10:1,5)


If you really want to copy the 5 byte field in 1-5 to the 6 byte field in 10-15, you can use this:

Code:

   OPTION COPY
   INREC BUILD=(10:1,5,X)


where the X is a blank.

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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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