Unfortunately in COBOL there isn’t an “elegant” way to find out the number of parameters passed into a called program. Unless your COBOL compiler provides a proprietary function (I think isCOBOL has one) the only way I’m aware of is testing the address of the parameters declared in the LINKAGE SECTION. The following two programs […]
The code samples below are all dedicated to COBOL language. These are all programs that I have personally written, compiled and run during the delivery of re-hosting projects. Almost all of them have been compiled using Dell Enterprise COBOL and some of them also executed in Dell TPE/BPE (formerly UniKix). Feel free to copy any snippet of code and to use it in your applications, if you have any suggestions or comments, your comments are really appreciated.
Write a text file using fopen, fwrite and fclose
The following program writes same sample data to a flat file using native Unix/Linux C APIs, it will run as is only in Unix/Linux environment. The program has been tested using Dell Enterprise COBOL and executed in Dell TPE. The same program can be compiled and executed using any available re-hosting platform for LUW. 1 […]
Exporting TS QUEUE data to a flat file

The following program extracts all the items of a TS queue and write them to a flat file. The program has been tested using Dell Enterprise COBOL and executed in Dell TPE. The same program can be compiled and executed using any available re-hosting platform for LUW. Please note that the program uses native Unix/Linux […]
SLEEP using CEE3DLY
CEE3DLY provides a service for Language Environment-conforming applications that suspends the processing of the active enclave for a specified number of seconds. The maximum is 1 hour. Syntax >>-CEE3DLY–(–input_seconds–,–fc–)————————->< input_seconds A full-word binary value in the range of 0 to 3600 that specifies the total number of seconds during which the enclave should be suspended. […]
Get current TIMESTAMP using CEELOCT
CEELOCT returns the current local date or time in three formats: Lilian date (the number of days since 14 October 1582) Lilian seconds (the number of seconds since 00:00:00 14 October 1582) Gregorian character string (in the form YYYYMMDDHHMISS999) These values are compatible with other Language Environment date and time services, and with existing language […]