1,799 questions
Score of 0
1 answer
135 views
How can I analyze COBOL program dependencies across CICS transactions and DB2 tables before modernization?
We are planning a mainframe modernization project for an IBM Z environment containing COBOL applications, CICS transactions, JCL jobs, and DB2 databases.
One of our biggest challenges is understanding ...
Score of 0
6 answers
138 views
I need to column "lock" in VSCODE
I am using VSCODE in order to write cobol. We are being pressured to move off of our legacy software. That being said, this one thing has infuriated me to no end: Cobol Tags.
I have done extensive ...
Score of 0
1 answer
279 views
z/OS DB2 version 13: how to detect a rollback in a mainframe batch environment execution
A SQL statement that returns an sqlcode -911 causes the rollback of the current unit of work (https://www.ibm.com/docs/en/db2-for-zos/13.0.0?topic=codes-911).
Suppose we have a main COBOL program that ...
Score of 0
4 answers
175 views
How does GO TO influence the control flow
I am new to COBOL/Mainframes in general, I am just looking into the legacy code and trying to understand the control flow. Can you please explain how GO TO influence the control flow in the below ...
Score of 1
2 answers
167 views
How to check variable for LOW-VALUE/SPACES from DEPENDING ON?
I have changed an OCCURS from constant number of elements to dynamic (DEPENDING ON):
01 OCC-VAL PIC 9(02) COMP VALUE 80.
01 TEMP-TABLE.
05 TABLE-OCC-OUT OCCURS 999 TIMES.
...
Score of 0
1 answer
65 views
memory allocation for linkage section in MF Visual Cobol
Microfocus Visual Cobol sub-program has a declaration in linkage section as below.
01 VAR1 EXTERNAL.
03 VAR1A.
05 VAR1B PIC X OCCURS 8500000 TIMES
INDEXD BY INDEX-VAR1.
...
Score of 0
1 answer
157 views
How to use the SORT statement with a 2D-table in COBOL?
I have the following data structure:
01 01 TABLE-01.
03 TABLE-03 OCCURS 5 TIMES.
05 TABLE-05 OCCURS 10 TIMES.
07 KEY-VAR PIC X(05).
07 SM-ELEM PIC X(04).
I need to use the SORT ...
Score of 1
2 answers
216 views
How to use copybooks for COBOL programm using CICS and DB2?
I am learning COBOL, CICS, and DB2. To that end, I created a program that implements a pseudo-transactional CICS process and interacts with DB2. The transaction works quite well, but the program ...
Score of 2
2 answers
137 views
Passing a pointer to PIC X by value VS passing a PIC X by reference
Reasoning as a C programmer, I wonder why these two ways of calling a program are not equivalent. The first way works properly, however the second one does not.
The platform is IBM z/OS by the way.
* ...
Score of 2
3 answers
179 views
Initial value of WORKING-STORAGE data-items
On IBM Enterprise COBOL for z/OS v6.1.0, I cannot seem to find any information about the initialization (or non-initialization) of data-items in the WORKING-STORAGE section that do not have a VALUE ...
Score of 1
2 answers
244 views
Removing trailing space in COBOL
I'm trying to autogenerate some COBOL code.
IDENTIFICATION DIVISION.
PROGRAM-ID. Generator.
AUTHOR. Scimitaria.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
...
Score of 3
2 answers
214 views
Quick Sort in GNU COBOL produces invalid result
I am trying to implement Quick Sort in GNU COBOL (version 3.2.2) using a recursive subprogram.
The sorting logic is standard and works perfectly in other languages (C, Python), but when I run it in ...
Score of 3
1 answer
99 views
Issue Using JSON_TABLE with CLOB in IBM i COBOL
I am encountering an issue when using JSON_TABLE in IBM i COBOL with CLOB data. Below is an example of the code I am using:
EXEC SQL
DECLARE C_EMP CURSOR FOR
SELECT U.FIRSTNAME, U.PHONETYPE
...
Score of 2
1 answer
156 views
Why does the SECURE Clause give me this display errors
I'm working on a login system for my project and I successfully made the login work. Now, when I tried to implement password masking using secure to asterisk the inputted password, it goes as intended....
Score of 2
1 answer
109 views
In COBOL COMP variables, what is the meaning of the parenthetical number?
I understand that PIC S9(4) COMP is a 2-byte variable whose value is bounded by +/- 32,768 and that PIC S9(9) COMP is a 4-byte variable whose value is bounded by +/- 2,147,483,648.
What does the ...