Page 1 of 1

COBOL Change command

Posted: Sun Dec 27, 2009 12:42 pm
by nagesh divvela
Hi all..

When we give the following statement in the command line
C ALL '##' $$'
it changes all the ## characters to $$ and also indicates the changed line by a label in the line no cols.

My question is how to skip from one changed line to the other...
Instead of scrolling through the total code is there any PF key functionality ?

Posted: Sun Dec 27, 2009 11:43 pm
by dbzTHEdinosauer
you could X ALL before the change.
otherwise you could try Find changed next

Posted: Mon Dec 28, 2009 8:46 am
by nagesh divvela
Thanks for that..

It is a good thought of giving a find for the changed string and then differentiating whether it was changed or not from the label "==CHG>" will do my need.

But I did not understand how X ALL would help in this context.

Posted: Mon Dec 28, 2009 8:52 am
by dbzTHEdinosauer
if you x all everything before the change. and then after you executed the chg, only the changed lines will be displayed.

Posted: Mon Dec 28, 2009 9:00 am
by nagesh divvela
Thanks for the explanation...

When I give X all command it ade the lines non displayable..
- - - - - - - - - - - - - - - - - - - 2 Line(s) not Displayed

But later when I gave the C ALL PRG ARG..it has changed the string and is displaying the total code as it shows when we give a change command in direct code without giving the X ALL command.

Suggest me in brief where I am wrong.

Thanks

Posted: Mon Dec 28, 2009 10:16 am
by dbzTHEdinosauer
C ALL PRG ARG
what is that?

if you are not editing or viewing the member/ds,
what facility are you using to make the change command.

in brief, you are not very informative.

Posted: Mon Dec 28, 2009 12:10 pm
by vrajx
Hey Nagesh,

what Dick said is correct. you have two ways.

1) Either you could do X ALL; C ALL '##' '$$'; C ALL PRG ARG
The above command will hide all the lines of the code and does two changes a) change ## to $$ where it encounters and b) change PRG from ARG
--- Once all the changes are done you can do RES command to view the entire code

2) Another way...... use &C PRG ARG and press enter
now this command will search and replace the first encountered string.
Then u can control the search and replace command with f5 and f6 buttons.
F5- Search next string
F6- replace string

I hope this is helpful to you.

Posted: Mon Dec 28, 2009 1:32 pm
by nagesh divvela
Thanks all for the information..

@Dick, thanks for giving that suggestion, earlier I was trying with
X ALL <string1>; C ALL <string1> <string2>
which executed as it has to execute.

@Vraix, thanks for mentioning the command clearly, your reply has given me a clear idea, thats really helpful

Regards

Posted: Mon Dec 28, 2009 4:05 pm
by vrajx
anytime... :)

Posted: Wed Jan 13, 2010 2:02 pm
by nagesh divvela
Hi,

I have gone through F1 as suggested, got the right answer for this.

after giving the Change command if we give 'L CHG', it will take you to the line where it was changed, '&L CHG' will take us through all the changed lines by enter.

Nagesh D