Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Tip: easy way to edit a COBOL comment box

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jerryte

Active User


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

PostPosted: Thu Dec 23, 2010 8:08 pm    Post subject: Tip: easy way to edit a COBOL comment box
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: 650
Location: Whitby, ON, Canada

PostPosted: Thu Dec 23, 2010 11:18 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us