Comment multiple lines in cobol
-
- Posts: 2
- Joined: Fri Oct 12, 2007 10:49 pm
- Skillset: jcl,vsam,cobol(beginner)
- Referer: search engine
Comment multiple lines in cobol
how we can comment multiple lines in cobol.......
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: Comment multiple lines in cobol
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.
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.
d.sch.
-
- Posts: 2
- Joined: Fri Oct 12, 2007 10:49 pm
- Skillset: jcl,vsam,cobol(beginner)
- Referer: search engine
Re: Comment multiple lines in cobol
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?.......
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?.......
-
- Posts: 6
- Joined: Tue Feb 19, 2008 9:33 pm
- Skillset: mvs, cobol, jcl, vsam, pl/1, racf, ca-7, ca-11, sas
- Referer: web search
Re: Comment multiple lines in cobol
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.
-
- Posts: 110
- Joined: Thu Dec 27, 2007 5:18 pm
- Skillset: Known little stuffs to answer a few queries!!
- Referer: Google
- Contact:
Re: Comment multiple lines in cobol
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.
Code: Select all
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.
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: Comment multiple lines in cobol
Hello,
Will this block of commented code ever be re-activated?
Will this block of commented code ever be re-activated?
Hope this helps,
d.sch.
d.sch.
-
- Posts: 110
- Joined: Thu Dec 27, 2007 5:18 pm
- Skillset: Known little stuffs to answer a few queries!!
- Referer: Google
- Contact:
Re: Comment multiple lines in cobol
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.
Post if you have any issues. Arun.
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.

Post if you have any issues. Arun.