About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Question & Answer
Question
How do you remove COBOL sequence numbers from both the left and right columns using IBM Rational Developer for System Z (RDz) Extensibility?
Cause
There is a request for enhancement (RFE) to reduce the number of steps needed to remove all sequence numbers. Please see the Related information section below for a link to this RFE .
In the current implementation you have to manually remove the sequence numbers from each side.
Answer
You can perform the following manual steps to remove sequence numbers from either columns 1-6 and/or columns 73-80 in a COBOL program using the COBOL editor:
Follow these steps to remove the Right sequence numbers (columns 73-80):
- Right click in COBOL program
- select
Source > Sequence Numbers > Unnumber
Next, remove Left sequence numbers (columns 1-6) following these steps:
- Select
Source > Sequence Numbers > Preferences
- Check the checkbox "Start numbering at column 1" under Numbering Options
- Right click in source
- Select
"Source > Sequence Numbers > Unnumber"
To programmatically remove the sequence numbers from both right and left with one click you can implement this sample plugin to alter the actions of Source > Sequence > Unnumber.
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
The new custom action will be available on the COBOL editor through the context menu:
|
The command removes right numbering then left:
|
Complete plugin project source code is attached below.
To use the sample plugin:
Edit a COBOL program in COBOL editor, right-click on the editor and select menu My Sequence number > Unnumber


To install the Sample plugin:
- unzip the attached com.ibm.support.rdz.mycoboleditor.updatesite
- From RDz 9.1.x, install the plugin from menu Help > Install New Software

To uninstall the Sample plugin:
- From menu Help > About > Installation Details
- On tab "Installed Software", select com.ibm.support.rdz.mycoboleditor.feature and click on Uninstall

Related Information
[{"Product":{"code":"SSJK49","label":"IBM Developer for z Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Editors","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.0.1;9.1","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Was this topic helpful?
Document Information
More support for:
IBM Developer for z Systems
Software version:
9.0.1, 9.1
Operating system(s):
Windows
Document number:
264617
Modified date:
27 October 2020
UID
swg21903148