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
 

 

Copy records from i/p to o/p with vary in field positions

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

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Thu Jul 12, 2007 10:17 am    Post subject: Copy records from i/p to o/p with vary in field positions
Reply with quote

Hi,

I need to copy all the records from input file to output file but the position of fields will be different.
ie. The 10th field from input file should be the first field in output file, 12th field from input file should be the second field in output file, 1st field from input file should be the third field in output file and so on....

What i mean to say is the filed positions from my input file to output file will vary.
So how can i do this using ICETOOL.

Thanks in advance.
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jul 12, 2007 10:50 am    Post subject:
Reply with quote

Fields in a record or records in a file?
It would be much clearer if you posted an example of your input and what you expected the output to look like.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Jul 12, 2007 10:57 am    Post subject:
Reply with quote

from your post - looks like you want to reformat fields from input to output.
if this is what you wanted to do then you can use OUTREC and give field positions.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jul 12, 2007 1:26 pm    Post subject:
Reply with quote

bhaskar_kanteti
This simple DFSORT JCL illustrates how the reformat of the record's from i/p to o/p can be done:
Code:
//*******************************************************               
//S1      EXEC  PGM=SORT                                               
//SYSOUT  DD SYSOUT=*                                                   
//SORTIN  DD *     
111122223333                                                           
AAAABBBBCCCC                                                           
/*                                                                     
//SORTOUT DD SYSOUT=*                                                   
//SYSIN   DD    *                                                       
  OPTION COPY                                                           
  OUTREC BUILD=(9,4, *COPY 3RD FIELD TO FIRST  FIELD                   
                1,4, *COPY 1ST FIELD TO SECOND FIELD                   
                5,4) *COPY 2ST FIELD TO THIRD  FIELD                   
/*                                                                     


SORTOUT would contain
Code:

333311112222   
CCCCAAAABBBB   

You need not use ICETOOL - this can be accomplished by simple DFSORT statements.
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 Jul 12, 2007 8:40 pm    Post subject:
Reply with quote

bhaskar_kanteti,

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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am


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