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
 

 

DFSORT to insert space in particular position of all record

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

New User


Joined: 10 Oct 2005
Posts: 27

PostPosted: Fri Mar 10, 2006 4:08 pm    Post subject: DFSORT to insert space in particular position of all record
Reply with quote

Hi Guys,

Could you anyone please show me a solution in using DFSORT for my problem.Actual requirement is, I have a file having thousands of records of each 150 bytes length and it is fixed length (FB).In my program on some purpose I am writing some value in the 150 th byte of eachrecord (It can be 1 to 7 ). It will be input to another program.After running the second program I want to remove the 150 th byte value from all records in the file.My actual intention here is to make this field back to space.

It is very very Urgent.....could you any one please suggest on this..

Thanks In advance,
Kran.
Back to top
View user's profile Send private message

fixdoubts

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Fri Mar 10, 2006 5:16 pm    Post subject:
Reply with quote

Hi,
This will do i think
Code:
//STEP EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=infile
//SORTOUT DD DSN=outfile
//SYSIN DD *
   SORT FIELDS=COPY
   OUTREC FIELDS=(1,149,C' ')
/*


This will copy first 149 bytes from the input file and the 150th byte will be spaces.
Regards,
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: Fri Mar 10, 2006 10:13 pm    Post subject:
Reply with quote

You can use the DFSORT job that fixdoubts showed or you can use this slightly simpler DFSORT job:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN DD *
   OPTION COPY
   INREC OVERLAY=(150:X)
/*
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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