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: 183
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: 647
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
No new posts Mass comment and edit elixir1986 IBM Tools 3 Thu Mar 02, 2017 10:09 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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