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

Replacing records at different positions


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

Active User


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

PostPosted: Wed Sep 24, 2014 12:11 am
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

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

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: 161
Location: South Africa

PostPosted: Thu Sep 25, 2014 3:50 am
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Sep 25, 2014 11:58 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top