-
COBOL File Handling
how do you read a file in reverse order through COBOL program?
-
PIC clause to hold decimal values
I have a file with 2 fields say 1st field is a indicator.2nd field is amount field.It has the values A,B,C,D.Suppose if the indicator is A,i want to move 123.4when B move 12.34when c move 1.234when d move 1234my question is what pic clause(only one op field variable) should be used to hold all the 4 types of variables.
-
Move X TO XX
A PIC X(1) value A.B PIC X(2) VALUE SPACES.IF MOVE A TO B. WHAT IS THE VALUE OF B. Is it ' A' OR 'A '.
-
-
-
-
-
-
-
-
-
-
-
-
In the example below
05 WS-VAR1 PIC X(5),05 WS-VAR2 REDEFINES WA-VAR1 PIC 9(5),PROCEDURE DIVISION MOVE 'ABCDE' TO WS-VAR1.Now what is the value of WS-VAR1 and WS-VAR2 ?
-
-
What is the difference between comp and comp-3 usage? Explain other COBOL usages?
Comp is a binary usage, while comp-3 indicates packed decimal. The other common usages are binary and display. Display is the default. 3/28/00 Dave Herrmann: 'I was reading your FAQ on Cobol, as an fyi Comp is defined as the fastest/preferred numeric data type for the machine it runs on. IBM Mainframes are typically binary and AS400's are packed.'