Linux-related changes for z390 Version 1.7

56 views
Skip to first unread message

John Ganci

unread,
Oct 15, 2020, 10:00:03 PM10/15/20
to z390
The beta cycle for z390 Version 1.7 has begun. You can download it from the
z390.info site. Some Linux-related changes are described here.

Since the z390 Yahoo group is moving to the z390 Google group, this is
being posted to both groups.

1, History.

Linux and macOS users like myself have additional steps to follow in order
to use z390. Martin Ward provided Perl scripts to allow Linux users to
assemble, link, and execute programs. A Linux user normally installs z390 in
one of three locations:
    /home/chris/lib/z390    (for user "chris")
    /usr/local/lib/z390
    /usr/lib/z390

A macOS user named chris would probably install z390 in their home directory:
    /Users/chris/lib/z390

One can also use the Z390 environment variable to provide the name of the
z390 directory.

The above convention is used because these are the directory names
that the Perl scripts use to search for the z390 directory.

Prior to Version 1.7, the z390 directory contains all the bat files
(ASM.BAT, ASML.BAT, etc) that are used to assemble, link, and execute
programs; it also contains the Perl scripts.

To invoke z390 from a Linux or macOS terminal window, a user invokes
the dos.pl Perl script that results in a "Windows-like" environemnt
where z390 commands are entered. For example, assume user chris has
installed z390 in /home/chris/lib/z390 and wants to assemble source
module /home/chris/source/IEFBR14.MLC. Sample interaction follows.
Lines beginning "chris:" are where chris types on the keyboard.

1 chris: $ cd
2 chris: $ lib/z390/dos.pl
3        z390 dos command processor started - enter bat file command or exit
4 chris: asmlg /home/chris/source/IEFBR14.MLC
5        output from the assemble, link, and go, followed by a new line
6 chris: exit
7        $

You may notice that on line 2 chris entered "lib/z390/dos.pl" instead
of "perl lib/z390/dos.pl". This because chris made all the Perl
scripts "executable" when z390 was installed. If you do not know
what this means, see item 3 below.

Note that on line 4 chris must enter the full path to the source module.
This is due to the dos.pl Perl script issuing a cd to the z390 install
directory, /home/chris/lib/z390.

If chris uses the z390 GUI, chris must first start the GUI, say by
         $ /home/chris/lib/z390/z390.pl

The GUI starts. All further interaction is as one would see on Windows.

2. Changes in Version 1.7 that impact the Linux scripts.

There are two new directories, bat and perl, under the z390 directory.
All the bat files are moved to the bat directory and all the Perl scripts
are moved to the perl directory.

Note: v1700 has a bat directory but no Linux support.
      v1701 added the Perl scripts, putting them in directory "Linux Perl".
      v1702 changes the name of the Perl script directory to perl.

The v1701 beta does NOT work on Linux! Some minor changes are required to
    the Perl scripts.
    some of the bat files, and
    one of the Java source modules.

The upcoming v1702 beta contains the needed changes. Assume that chris has
again installed z390 in /home/chris/lib/z390 and wants to assemble source
module /home/chris/source/IEFBR14.MLC. Sample interaction follows.

1 chris: $ cd
2 chris: $ lib/z390/perl/dos.pl
3        z390 dos command processor started - enter bat file command or exit
4 chris: asmlg /home/chris/source/IEFBR14.MLC
5        output from the assemble, link, and go, followed by a new line
6 chris: exit
7        $

Note that there is only one change from the pre-Version 1.7 interaction:
line 2 now has the perl directory in the path.

Invoking the GUI is done in a similar manner:

        $ /home/chris/lib/z390/perl/z390.pl

Here is an actual execution of one of the test programs provided by z390.

$ lib/z390/perl/dos.pl
z390 dos command processor started - enter bat file command or exit
asmlg /home/xxxxxxxx/lib/z390/tests/TESTINS3.MLC
asmlg /home/xxxxxxxx/lib/z390/tests/TESTINS3.MLC
rem asmlg assemble, link, and go from mlc to 390 execution
echo off
16:38:27 TESTINS3  MZ390 START USING z390 V1.7.00 ON J2SE 1.8.0_201 10/15/20
16:38:28 TESTINS3  MZ390 ENDED   RC= 0 SEC= 0 MEM(MB)= 76 IO=14702
16:38:28 TESTINS3  LZ390 START USING z390 V1.7.00 ON J2SE 1.8.0_201 10/15/20
16:38:28 TESTINS3  LZ390 ENDED   RC= 0 SEC= 0 MEM(MB)= 41 IO=2520
16:38:28 TESTINS3  EZ390 START USING z390 V1.7.00 ON J2SE 1.8.0_201 10/15/20
TESTINS3 RT1 STARTED
TESTINS3 RT1 TESTS COMPLETED =    593
TESTINS3 RT1 ENDED OK
16:38:28 TESTINS3  EZ390 ENDED   RC= 0 SEC= 0 MEM(MB)= 22 IO=71 INS=4199
exit
exit
$

3. Make the Perl scripts executable.

When one initially installs z390 from the provided zip file, the Perl scripts
in the perl subdirectory are not marked executable. That is, issuing
"ls -l" on the perl directory will show

-rw-r--r--.  ... cmd.pl
-rw-r--r--.  ... dos.pl
-rw-r--r--.  ... z390.pl

Change directory to the perl directory and issue

    chmod 755 cmd.pl
    chmod 755 dos.pl
    chmod 755 z390.pl

Now "ls -l" shows

-rwxr-xr-x.  ... cmd.pl
-rwxr-xr-x.  ... dos.pl
-rwxr-xr-x.  ... z390.pl

The scripts are now executable for user, group, and other.

It is highly recommended that you do this for every z390 install.

4. Additional Perl script change to alloc "ECHO ON".

On a Windows PC, issuing

    asm tron <full path to source>

turns "ECHO ON" in the ASM.BAT file.

Attempting this on a Linux PC results in errors. The changes for
the v1702 beta fix this problem.

5. Summary

5.1. Version 1.7 of z390 moved the bat files and Perl scripts to their own
directories, which required internal changes to bat files, Perl scripts,
and Java source.

5.2. With the changes, available in the v1702 beta, one can
use z390 on Linux and macOS to assemble, link, and execute assembler
source, as well as compile, link and execute COBOL source.

5.3. The only change required by the user is to insert the perl directory
into the path to the invoked Perl script.

Regards,

John Ganci

Reply all
Reply to author
Forward
0 new messages