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

ISPF Editor: Copy records columnwise


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Fri Nov 13, 2009 10:11 pm
Reply with quote

Hello.

I have a flatfile (FB,LRECL=133), I want to copy the block records which comes under column 1-5 to 55-60 (at present column 55-60 is empty). Please le me know the command used for this.

Thanks.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Nov 13, 2009 11:16 pm
Reply with quote

If the file is small enough to be edited, start playing around with the BNDS and ) line commands, if not use SORT.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Sat Nov 14, 2009 2:00 am
Reply with quote

You can write a small edit macro to read each line, use the Rexx overlay() function and rewrite the line. I assume you want to pad the extra character with a blank (source is 5 chars long, dest is 6)
Code:

Address isredit                                 
'MACRO'                                         
'(LAST) = LINENUM .ZL'                           
Do a=1 to last                                   
  '(LINE) = LINE 'a                             
  line = overlay(substr(line,1,5),line,55,6,' ')
  'LINE 'a ' = (LINE)'                           
End                                             
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
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 Looking for a little history of ISPF ... TSO/ISPF 5
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
Search our Forums:

Back to Top