01 VAR1 COMP-2 VALUE 0.
MOVE 10.2115 TO VAR1.
DISPLAY 'VAR1 =' VAR1.
10.2115 is stored as .10211499999999996E 02 in OS VS Cobol
10.2115 is stored as .10211500000000000E 02 in ecobol.
Any reason why?
after udatingg first 110 rows, my job abends. now how do i
change my cobol program so that when i restart the Job it
will start updating from 111th row ( i.e in next run I
di=ont want to update those 110 rows which are already been
updated in the first run before job abend)
I have two sequential files, FILE-1 and FILE-2.
FILE-1 contains 2 columns(A,B) and FILE-2 contains 3 columns
(C,D,E).I want an output file, FILE-3 which has all five
columns with duplicates eliminated from column A.
01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING".
01 NAME2 PIC X(13).
now I want to display the value of NAME1 in reverse order
i.e value should be displayed as "GNIMMARGORP LOBOC"
HOW can I do that ??? please let me know if any one knows
I have PS flat file with 14 records. I want to read from
4th to 9th record and want to write those 6 records (4th
record to 9th record) to another PS file (output file).
there is no key defined in the input file. I just want read
a certain Consecutive records. can any one please give me
the procedure division Coding for this. I have coded the
below coding but the READ-PARA is performing only 1 time
even though I have 14 records in my input file (i.e FILE-1):
MOVE 0 TO I.
OPEN INPUT FILE-1.
IF CHECK-KEY1 > 0
DISPLAY "OPEN ERROR FOR FILE-1, CODE IS:" CHECK-KEY1
OPEN EXTEND NEWFILE-1
IF CHECK-KEY3 > 0
DISPLAY "OPEN ERROR FOR NEWFILE-1 COD IS" CHECK-KEY3
PERFORM READ-PARA THRU EXIT-PARA UNTIL EOF-REC = 'YES'.
DISPLAY " FINALLY OUT OF LOOP"
ADD 1 TO I
AT END MOVE 'YES' TO EOF-REC
IF I > 3 AND < 10
DISPLAY "NOT IN RANGE"
WRITE NEW-REC FROM FILE1-REC.
How to delete a front spaces in a data-name/variable in
01 data-name-1 PIC x(20) value " cobol language".
01 data-name-2 PIC x(20).
MOVE data-name-1 to data-name-2.
would like the value of data-name-2 is "cobol language".
How to resolve the soc4 & soc7
other than following answers.
Soc4 can resolved using mispleed dd name and dd name is not
matching with file
and soc7 check the sysdump and copy the offest address then
correct it in the program.
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
I need to compare 3 variables(dates) and do some processing
based on the earliest date. There could be more then 1 date
record in any of the 3 fields. What is the best way to code
Can anyone explain me CALL procedure in COBOL.Does it
carries similarities like call by reference in C.
How to find out the closest prime number of an input number?
I believe it has something to do with SEARCH and COBOL
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
how to know that the file has 300 records how to acess it?
01 A PIC X(3) VALUE 'ABC'
01 B PIC 9(3).
MOVE A TO B.
OUTPUT IS: AB3
WHY AND HOW THIS IS HAPPENING.
What are options have been removed in COBOL 11?
How do get the result of your program directly on your pc?
If a sub program is called from mainprogram.I have opened
cursor in main program and Fetch the result in
subprogram ,Is it possible ?If yes please tell me the
I have sequential file recl 1000 i want to add another 15
bytes to it. The record length should not change..How?
example for sub strings ? and refernce modifications whit output pls
How do you get the data to code the BMS macro?
I have program P1 which calls file F1 which has 100 records
and following structure
Now I want to read these files and write these records in
file F2 in following manner.
001 ...... 051 .....
002 ...... 052 .....
003 ...... 053 .....
048 ........ 098 ......
049 .......... 099 .......
050 .... 100 ......