IIRC is means a pictorial definition of a value so the above is a float printable using 12 positions which for maximum value would be as 999999999.99
While a PIC X(10)
Means character string length 10.
It was defined in era of fixed width fonts and band printers so the max printing width was 132 and one had to know exactly where each character would print.
Report writing in COBOL is easy.
Almost correct. However, this is not a float but a fixed decimal value with two decimals. The V is not stored but just used to indicate where the decimal sign should be.
Source: I've written a lot of COBOL years ago.
PIC is short for PICTURE, which was the original form of the keyword. Picture the number printed this way.
Edit: the numbers in parentheses are repeats. PIC 9(9) means up to 9 digits in the printed representation of the value stored in the variable that has this PIC.
yep. the comments are for folks who have never tried to read cobol before, which is probably 99% of people looking at the project. this way they can understand a familiar idea expressed in a language that is probably wildly different from what theyre used to.
I seem to understand most of it except for this data typing stuff:
and the like. What is PIC?IIRC is means a pictorial definition of a value so the above is a float printable using 12 positions which for maximum value would be as 999999999.99 While a PIC X(10) Means character string length 10. It was defined in era of fixed width fonts and band printers so the max printing width was 132 and one had to know exactly where each character would print. Report writing in COBOL is easy.
Almost correct. However, this is not a float but a fixed decimal value with two decimals. The V is not stored but just used to indicate where the decimal sign should be. Source: I've written a lot of COBOL years ago.
PIC is short for PICTURE, which was the original form of the keyword. Picture the number printed this way.
Edit: the numbers in parentheses are repeats. PIC 9(9) means up to 9 digits in the printed representation of the value stored in the variable that has this PIC.
yep. the comments are for folks who have never tried to read cobol before, which is probably 99% of people looking at the project. this way they can understand a familiar idea expressed in a language that is probably wildly different from what theyre used to.
for example IT IS YELLING AT US THE WHOLE TIME