Highlighted
Absent Member.
Absent Member.
1875 views

Run COBOL program with Thin-Client on Linux server

[Migrated content. Thread originally posted on 19 July 2011]

I am trying to launch some 3rd-party COBOL programs using Thin-Client running on a Linux server. I have been able to get these puppies to run under telnet with no problem. However, when Thin-Client - there is only a momentary flicker and nothing executes. In order for the programs to run, the run mechanism launches the program where its expected resources are located. My approach has been to use execute a shell script to spawn -- runcbl … progname as described below:

RUN.WIDGET
FILE_PREFIX=.;export FILE_PREFIX
CODE_PREFIX=/usr/client/obj_locJ; export CODE_PREFIX

CODE_SUFFIX=OBJ;export CODE_SUFFIX
FILE_SUFFIX=FIL;export FILE_SUFFIX

runcbl -c /etc/cblconfig.widget $1


CBLCONFIG.WIDGET
CODE-PREFIX /usr/client/obj_loc
CODE-SUFFIX OBJ
FILE-SUFFIX FIL

#For compatibility with 3rd-party COBOL programs.
ERRORS-OK 1
V_VERSION 3


Best regards,

 

Reed Harvey

www.Linkedin.com/in/reedharvey

0 Likes
2 Replies
Highlighted
Visitor.

RE: Run COBOL program with Thin-Client on Linux server

Unfortunatley, you can't use a shell script to spawn runcbl. But you should be able to accomplish what you want.
First, put all your config variables (FILE_PREFIX, CODE_PREFIX, FILE_SUFFIX, CODE_SUFFIX, ERRORS_OK, V_VERSION, and any others) into a config file. You've got some of them there already, in cblconfig.widget.

Then, create a thin client alias using the "acurcl -alias" utility. It will prompt you for an alias name (any name you choose will do), a working directory (fully qualified), and a command line. The command line would be the same as you use for running runcbl via telnet, minus the "runcbl". For instance, -c /etc/cblconfig.widget -le errorfile myprogram
Anything referenced on the command line that's not fully qualified (like "errorfile" in the example above) is assumed to be in the working directory you've specified.

Here's what the "acurcl -alias" dialog would look like, to create an alias "myalias" that will run an initial program "myprogram" in directory "/usr/client/obj_loc":

# acurcl -alias
Enter the name of the alias file: [/etc/acurcl.ini]

'/etc/acurcl.ini' does not exist.  Do you want to create it [N]? y

RCL Alias file options
1 - Add an alias entry
2 - Remove an alias entry
3 - Modify an alias entry
4 - Display alias entries
5 - Exit

Enter choice [4]: 1

Add an alias
Enter the alias name: myalias
Enter the working directory:
/usr/client/obj_loc
Enter the command line:
-c /etc/cblconfig.widget -e errorfile myprogram
Press to continue...


Then, assuming the acurcl daemon is up and running (on server "myserver" and port 5632), from the client you'd execute:
acuthin myserver:5632 myalias
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Run COBOL program with Thin-Client on Linux server

Thanks for your info. What you suggested I did by manual copy/paste in /etc/acurcl.ini and linking that alias to one of the programs and then created an icon to run it. I showed this to the client to stave off anxiety and show some progress. However, the objective is to be able to run these 20+ programs as menu options within an ERP Software.

And yes, I have been able to run the shell script run.widget whose last line is the runcbl statement. There are over 20 programs this client we inherited has run under a telnet interface for over 15 years. I am trying to these using an upgraded version of the same software using Thin-Client running on a Linux server.


Thanks

Best regards,

 

Reed Harvey

www.Linkedin.com/in/reedharvey

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.