Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 662
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 How to display offset thru cobol prog... tvinodkumar7 CICS 2 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us