Hi, I have a Cobol program that reads values from a sequential file. So that if the values change we do not have to release the code again, just a data file change with new values. The problem i am getting to make operators configurable.
for example: I have one If statement like
IF...
Hi,
I am working on VAX/VMS with COBOL.
I have a cobol program runs by a command procedure and it creates report name test_report_'p1'.rpt
Here p1 is the current date. This command procedure runs every day with nightly_job. So every day reports created with test_report_'p1'.rpt.
Rigth now...
Hi, I am doing
01 val1 pic 99v99999 comp.
01 val2 pic 9(7).
01 val3 pic 9(7).
Move val1 to val2.
divide val2 by 100 giving val3.
Question:
When i do this i an not getting right values.
Value for val1 is 0.324
value of val2 i am getting is 03452345 it is garbage...
please...
I have a field
01 sale 9(4)v9(5) comp.
I need to move this to a 9(7) field.
value in sale field is always 0012.34567 or 0098.76543 any number starts with two zero and then number.
can any one help.
I did it with replace like below
01 sale 9(4)v9(5) comp
replacing 9(4)v9(5) ==...
Hi,
I have cobol code like below.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
FILE-CONTROL.
SELECT ABC_FILE ASSIGN TO 'ABC_FILE'
ORGANIZATION IS INDEXED
RECORD KEY IS XXX OF ABC_FILE
ALTERNATE RECORD KEY IS ZZZ OF ABC_FILE
ACCESS MODE IS DYNAMIC...
Hi i need to print the value of field2 in format 99.99999
SO I CREATED A N EW FIELD WITH FORMAT 99.99999. But when i do move from field2 to field3 it PRINTS 45.00000 WHICH IS WRONG. i WANT IT TO PRINT 45.12345.
can any one help HOW TO WRITE IN THE CODE.
WORKING-STORAGE SECTION.
01...
Hi, I have to move a alphanumeric number to numeric number. What is the impact of it.
Example:
01 number1 pix x(10).
01 number2 pic 9(10).
move number1 to number2.
The problem is number1 can be 7 digits so in that case number2 is not moving 000number1 in number2 field it is...
Hi,
I have a field REFILL_DATE of type Number and size 128. It contains 16 date in format ddmmyyyy. To define it in file i have written below code.
BUT it is giving error saying numeric value can maximum go up to 35. Can not define. error in line pic 9(128).
Can any one help....
01...
Hi, I am new to cobol. I have to read an index file for specific key but with out locking the file. That specific key is not unique.
I looked in to books and got confuse. Do i have to first START the file then READ it with NEXT.
or I can directly read the file.
Please help.....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.