Comment multiple lines in cobol



Comment multiple lines in cobol

Postby aravind » Thu Mar 13, 2008 12:53 pm

how we can comment multiple lines in cobol.......
aravind
 
Posts: 2
Joined: Fri Oct 12, 2007 10:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comment multiple lines in cobol

Postby dick scherrer » Fri Mar 14, 2008 5:17 am

Hello aravind and welcome to the forums,

Put an asterisk in col 7 of each line in a group of comment lines.

There is no comment start/end that i'm aware of.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Comment multiple lines in cobol

Postby aravind » Fri Mar 14, 2008 7:30 pm

hi thanks for ur answer
but suppose im having 2000 lines of code,if i want to comment all the lines after 1000th line means how i can give,its impossible to put * in every 7th column?.......
aravind
 
Posts: 2
Joined: Fri Oct 12, 2007 10:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comment multiple lines in cobol

Postby pi17388 » Fri Mar 14, 2008 7:53 pm

there are several source edit/change tools that could do this rather simply...fileaid, ispf/rexx, and even a batch sort (icesort or syncsort) come to mind.
pi17388
 
Posts: 6
Joined: Tue Feb 19, 2008 9:33 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comment multiple lines in cobol

Postby arunprasad.k » Fri Mar 14, 2008 8:49 pm

there are several source edit/change tools that could do this rather simply...fileaid, ispf/rexx, and even a batch sort (icesort or syncsort) come to mind.


Try this ISPF command to comment 2000 lines of COBOL code.

1. In the first line give .a in the line number area. (To label it as line number 1)
2. In the last line give .b in the line number area. (To label it as last line)
3. Give the following command in the command line.

C ALL ' ' '*' 7 .a .b


Alternatively, make the point 3 as a REXX edit macro and run it.

Post if you have any questions. Arun.
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comment multiple lines in cobol

Postby dick scherrer » Sat Mar 15, 2008 3:55 am

Hello,

Will this block of commented code ever be re-activated?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Comment multiple lines in cobol

Postby arunprasad.k » Sat Mar 15, 2008 11:39 am

I assume that Dick is concerned about reverting the changes done after a period of time.

If you want to uncomment/re-activate the commented code AND if you use '*' in column number 7 to comment a line in your esisting programs, then you can use '/' in column 7 to comment the code for this purpose (just to differentiate the affected line).

But if your programs has both '*' and '/' to comment the line then we might have to thing of a different solution. :roll:

Post if you have any issues. Arun.
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time


Return to FAQ

 


  • Related topics
    Replies
    Views
    Last post