Page 1 of 1

Syntax or utility for adding mesage at a particular position

PostPosted: Tue Oct 07, 2008 12:57 am
by mainframe_amit
I want to add message in a Sequential file at a particular column in a particular row.
Can any body tell me if there is any TSO command for copying or replacing particular text from given column number in a given row or if it can be done with any utility like DFSORT.

Re: Syntax or utility for adding mesage at a particular position

PostPosted: Tue Oct 07, 2008 1:10 am
by Bill Dennis
Are you inserting a new record or does the row exist?

Re: Syntax or utility for adding mesage at a particular position

PostPosted: Tue Oct 07, 2008 1:24 am
by dick scherrer
Hello Amit and welcome to the forum,

It will help if you post some sample data, the message you want to add, and the resulting data after the message has been added. If there could multiple formats, show them.

When you post these, please use the "Code" tag for readability (do not use a screen capture). Also, use Preview to see how your post will appear to the forum (rather than how it appears in the reply editor). When you are satisfied with how your post appears, Submit.

Re: Syntax or utility for adding mesage at a particular position

PostPosted: Tue Oct 07, 2008 11:08 am
by mainframe_amit
Hello Dick, Thanks for the suggestions. I will take care of it in future.

Here I am not talking about any code. But my query is if there is any TSO command for replacing (changing) the existing text in a known row at a known column.

Like we have below command for changing the known text at a known column:
C ALL 'AMIT' 'MY NAME IS AMIT' 50

This command would change all 'AMIT' text which starts from column number 50 only to 'MY NAME IS AMIT'

But if I want to change above text for a particular or known row number, do we have an TSO Command for it.

Please let me know i am not clear.

Thanks
Amit Goel

Re: Syntax or utility for adding mesage at a particular position

PostPosted: Tue Oct 07, 2008 7:13 pm
by Bill Dennis
An option is to use a stacked command to scroll down to the row and change only one occurence, after doing a RESET to remove message lines which might affect the line #.

Example, Scroll to line 5 and change the string.
RESET;DOWN 5;C 'AMIT'  'MY NAME IS AMIT' 50