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

add 10 bytes into a record through SORT


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar119119

New User


Joined: 31 May 2010
Posts: 25
Location: Pune

PostPosted: Fri Jul 30, 2010 10:00 pm
Reply with quote

Hi to All,

This is an IBM interview question,

Interviewer:

I have 100 records in a file,
LRECL=80,

1.......9 12.....20 25......40 45........60


this is the record layout,

I want to insert ABCDEFGHIJ from 66........75 in all 100 records,

How do you code this?

Please Folks.... give me answer, I cant reply,
I tried to explain through COBOL, but he wants thru SORT only
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Jul 31, 2010 6:13 pm
Reply with quote

Try this untested code:
Code:
//SYSIN DD *                       
  OPTION COPY                       
  INREC FIELDS=(1,65,66:C'ABCDEFGHIJ',76:66,14)
/*

Note that this will produce an output data set with LRECL=90 rather than LRECL=80. To keep the same LRECL you would need to use OVERLAY but then what to do with those ten bytes which are OVERLAYed, should be answered first.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top