OS Information from a Linux Server

0 Likes

This article describes how to get information about the Operating System when an ACUCOBOL-GT runtime is executed on a Linux server

Problem:

How to get information about the Operating System when an ACUCUBOL-GT runtime is executed on a Linux server.

Resolution:

Usually, you can use ACCEPT from SYSTEM-INFO on Windows environments, but this returns only "Unix" when the server is non-Windows.

To get more information from a Linux server, use code like this:

identification division.
program-id. prog.
author.
remarks.

environment division.
input-output section.
file-control.
select myfile assign to "-p uname -a"
organization line sequential
file status fs.

data division.
file section.
fd myfile.
01 rec pic x(50).

working-storage section.
01 key-pressed pic 9(4) is special-names crt status.
01 fs pic xx.
procedure division.
main-logic.
open input myfile
read myfile next
at end continue
end-read
display rec
accept omitted
close myfile

stop run.





Date:

Name:

Description of change:
Date:

Name:

Description of change:

Old KB# 14290
Comment List
Related
Recommended