IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT to insert space in particular position of all record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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 Developer


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

PostPosted: Fri Mar 10, 2006 10:13 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top