Follow

Operate in EBCDIC mode?

Elastic COBOL can operate "somewhat" within the EBCDIC environment.  Java runs in Unicode, not ASCII or EBCDIC, character strings within a Java program are Unicode.  Elastic COBOL performs data type conversion such that file I/O can be converted from EBCDIC into Unicode.  This uses Java's codepage mechanism.  The Elastic COBOL compiler option -dt:ibm will compile programs to use this "native EBCDIC" file format and the runtime option ibm.codepage=Cp1047 is used to specify a specific EBCDIC code page when -dt:ibm is in effect.

But Java strings are always Unicode and comparisons are done that way.  When a COBOL element (e.g,, PIC X(10)) is assigned a value (e.g., "MOVE 'abc' to MYPICX") the variable contains essentially Unicode single-byte characters, which is ASCII.  A check for X'40' in the program would not test for "space".  Similarly, internal sorting of characters will be Unicode/ASCII order instead of EBCDIC.

There is also a capability to read/write physical sequential files in IBM variable record formats (RECFM=V or RECFM=VB) with "block descriptor words" and "record descriptor words".  This is done with the Elasstic COBOL File Protocols that may be prepended to a file name.  For example, "ASSIGN TO 'ibmvb:/home/mark/myfile.dat' " in a COBOL file descriptor will use BDWs and  RDWs.  These capabilities are available in Elastic Batch Platform (JES/JCL) with the PROTOCOL=IBMVB keyword on the DD statement.

See ecobol Options for more info.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk