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

Tip: easy way to edit a COBOL comment box


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Thu Dec 23, 2010 8:08 pm
Reply with quote

If a program has comments inside a "box" made up of asterisk then here is an easy way to edit the contents without having to retype the box.

Tip#1 - leave off the right side of the box. This makes it easy to edit without detracting from the appearance too much

Tip#2 - if you really like a complete box then use the edit tabs feature
  • type command TABS on a line next to the box to expose the tabs line
  • Within the Tabs line put an asterisk 1 position to the right of the left side of the box
  • Put another asterisk 1 position to the left of the right side of the box (see below)
  • on the command line type TABS ON STD to activate the tabs
Code:
 000004       *****************************************************************
 =TABS>        *                                                             * 
 000005       *                                                               *
 000006       *  PROGRAM: SAMPLE                                              *
 000007       *                                                               *
 000008       *                                                               *
 000009       *  PLATFORM: MVS BATCH; COBOL II                                *
 000010       *                                                               *
 000011       *****************************************************************
Now when you insert or delete lines within the box ispf will not change anything to either side of the tabs. Don't forget to turn TABS OFF when you are finished.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Dec 23, 2010 11:18 pm
Reply with quote

Cool. I haven't used TABS since my very first ISPF training course. Nice to see that they're good for something.

I usually follow Tip #1.

I am not a big fan of comment boxes anyway. Back in the days when program source listings were routinely printed they were a useful way to draw attention to the comments. Nowadays I prefer to use the ISPF Edit "HILITE COBOL" subcommand, which causes the comments to turn blue.
Back to top
View user's profile Send private message
Jeffrey Ranney

New User


Joined: 23 Dec 2010
Posts: 20
Location: USA

PostPosted: Tue Dec 28, 2010 6:04 pm
Reply with quote

This is a very good tip! However, the user will have to turn the TABS off after each use so it doesn't affect the rest of your edit session.

Another good way to do this, is to use special characters in the body of the comment block, usually low-values. In the original example in the first post, make column 8 and column 71 inside the comment box be low-values. This way, you can TAB to each tab entry.

--OR--

You can go through the ISPF tutorial to read about the other formats of tabbing in ISPF EDIT :

1 - Software tabbing
2 - Hardware tabbing
3 - Logical tabbing

N'joi !!
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top