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
 

 

Replacing records at different positions

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

Active User


Joined: 22 Mar 2009
Posts: 157
Location: South Africa

PostPosted: Wed Sep 24, 2014 12:11 am    Post subject: Replacing records at different positions
Reply with quote

Hi,
I have a file with RECL=448 and RECFM=VB.
I want to replace position from position 239 length 12 into position 251 length 12.
Basically whatever value from position 251(length=12) has it should move to 239(length=12).
After that 251(length =12) should be repalaced by zeroes. Also these two variables are S9(10)V99.

Example:
Code:
10 AAAAAAA-PROGR-NUM             224 000000002179814           
10 AAAAAAA-PROGRASE-AMT          239 00000000005{             
                                 239 0.50                     
10 AAAAAAA-PROG-BACK             251 00000005090{             
                                 251 509.00                  This must go into field AAAAAAA-PROGRASE-AMT and be changed to zero.   
10 AAAAAAA-PROG-TRAN-CODE        263 525                       
10 AAAAAAA-PROG-PT               267 Y                         
10 AAAAAAA-PROG-CODE             268 09249908 
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Wed Sep 24, 2014 9:37 pm    Post subject:
Reply with quote

http://pic.dhe.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.icea100/inreceg.htm

Please let us know if you get any issues while doing so.
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 157
Location: South Africa

PostPosted: Thu Sep 25, 2014 3:50 am    Post subject:
Reply with quote

Thanks Rohit.
The below card worked:
Code:
//SYSIN DD *                               
  OPTION COPY,VLSHRT                       
  INREC OVERLAY=(244:256,12)               
  OUTREC OVERLAY=(256:C'000000000000')     
/*   


I dont know why I was trying BUILD instead OVERLAY due to which I was not getting the desired output.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Sep 25, 2014 11:58 am    Post subject: Reply to: Replacing records at different positions
Reply with quote

This is the description of VLSHRT from the manual, so it is doing nothing for you:

Quote:
Temporarily overrides the VLSHRT installation option, which specifies whether
DFSORT is to continue processing if a "short" variable-length SORT/MERGE
control field, INCLUDE/OMIT compare field, or SUM summary field is found.
A short field is one where the variable-length record is too short to contain the
entire field, meaning that the field extends beyond the record. VLSHRT applies
to the SORT, MERGE, INCLUDE, OMIT and SUM statements, and to the
INCLUDE and OMIT parameters of the OUTFIL statement.


You previously used BUILD and encountered problems with short records, and didn't identify what those short records were (so that you could avoid them).

You now use OVERLAY. It won't fail with the short records, but it will extend them to the length of your OVERLAY fields which I strongly doubt it what you really want to do.

You don't need to use INREC and OUTREC anyway, you could code that all on one OVERLAY.

If you'd showed the cards you were trying and the problems you had, you'd have had an answer long ago.
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


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