Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us