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
 
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 Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm

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