Hmmm, you use the term RETURN CODE twice. The 12 is obviously the program return code; is the other one actually a file status? Usually, one does not interrogate the program return code in a COBOL program. The program moves 12 to Return-code?
Stephen J Spiro
Wizard Systems
ISAM and BDAM (in this case) are IBM file structures, altho other computer manufacturers also had their versions of ISAM. They stand for Index-Sequential Access Method and Basic Direct Acess Method. (There is another kind of ISAM used on PC's). Support was no longer provided in the 1985...
The International Standards Organization (ISO/IEC) has approved the new standard; the approval process is still going on for ANSI, but it almost certainly will be approved before year-end.
Unfortunately, ISO is asserting a copyright on the new standard. However, once the standard is issued...
The first stament moves the first 11 characters of 1180-AMPS-BTCH-DTL-LINE-MSC to the target field.
the second statement tests if the 12th character of 1180-AMPS-BTCH-DTL-LINE-MSC is equal to 'p'.
This is REFERENCE MODIFICATION. Check it out in your manual.
STEPHEN J SPIRO
You need to have group names.
01 GRP-A.
05 A OCCURS 10 TIMES PIC S9(4) comp-3.
01 GRP-B.
05 B OCCURS 10 TIMES PIC S9(4) COMP-3.
MOVE GRP-A TO GRP-B.
If you try to move A to B, the compiler will insist on a subscript.
Stephen J Spiro
Use the RETURN-CODE specialk register (an IBM extension to the Standard). Check the JCL manual if you don't know how the JCL uses return codes.
Stephen J Spiro
This is from the IBM Language Reference Manual:
1.1.3.5 RETURN-CODE
The RETURN-CODE special register can be used to pass a...
This compiler has obviously implemented the NEW STANDARD "Fixed format", which eliminated the old SECTION A and SECTION B. This is a good example of why that change was a bad idea. Code starts in column 8 (sometimes!), and it is hard to see where paragraphs begin and end. Write to...
Sorry to disagree, Marc, but in 25 years of COBOL programming, I have seen SECTIONs rarely PEFORMED, and they are being used less and less. As a consultant, I've been in a LOT of shops, so I'm basing my comments not on a few installations. I find it true not only in IBM COBOL, but DEC, NCR...
Marc is right, the code is commented out for production, and the compiler will then ignore statements with "D" in column 7.
DO NOT USE IT. "with debugging mode" is obsolete in the next COBOL standard (due this year), and will be dropped from the standard after that.
There...
The "V" is an IMPLIED decimal point. It has no impact on the internal storage.
You can have
O5 FIELD1 PIC S9999 COMP-3.
05 FIELD2 PIC S999V9 COMP-3.
05 FIELD3 PIC S99V99 COMP-3.
05 FIELD4 PIC S9V999 COMP-3.
IF YOU MOVE 1234 TO FIELD1
OR...
fIRST, YOU DO not NEED (YOU CANNOT HAVE) a real decimal point in a non-edited numeric field. The period is NOT a numeric chatacter. The period is assumed to be at the end of a numeric field which does not contain a "V".
Please show us your actual W-S and Procedure Division code. The...
The LENGTH special register is not in the 1985 COBOL Standard. Note the 'x' in the left-hand column of the IBM definition: this indicates an EXTENSION in IBM manuals.
The new standard also will not have a LENGTH special register; the LENGTH Function is still available. There will also be an...
The COBOL Compilers are so expensive because COBOL, far and away, is the most feature-rich programming language in the entire industry. And with the new standard, it moves from being the most feature-rich, versatile business programming language, to being the most feature-rich, versatile...
This will really get your clients angry. The more appropriate solution is to shut down your software properly when the X is selected.
Stephen J Spiro
President
Wizard Systems
ZONED DECIMAL is essentially display numeric in EBCDIC (an internal representation code similar to ASCII).
PACKED DECIMAL is essentially a numeric field with only the decimal numeric part of each byte stored in the field. Different computers store it in different ways.
If you do not know what...
The new (2002) COBOL standard is fully Object Oriented, using the CORBA model. A Class Library is being developed and will be ready soon.
IBM's new "Enterprise COBOL" implements most of the new standard, and provides for mix-and-match COBOL and JAVA classes.
Use of the OO features is...
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.