This is a ported perl for the POSIX subsystem in BS2000 VERSION OSD V3.1A or later.
It may work on other versions,
but we started porting and testing it with 3.1A and are currently using Version V4.0A.

The yacc coming with BS2000 POSIX didn't work for us.
So we had to use bison.
We had to make a few changes to perl in order to use the pure (reentrant) parser of bison.
We used version 1.25,
but we had to add a few changes due to EBCDIC.
See below for more details concerning yacc.

To extract an ASCII tar archive on BS2000 POSIX you need an ASCII filesystem (we used the mountpoint /usr/local/ascii for this).
Now you extract the archive in the ASCII filesystem without I/O-conversion:

You may ignore the error message for the first element of the archive (this doesn't look like a tar archive / skipping to next file...),
it's only the directory which will be created automatically anyway.

After extracting the archive you copy the whole directory tree to your EBCDIC filesystem.
This time you use I/O-conversion:

There is a "hints" file for BS2000 called hints.posix-bc (because posix-bc is the OS name given by `uname`) that specifies the correct values for most things.
The major problem is (of course) the EBCDIC character set.
We have german EBCDIC version.

Because of our problems with the native yacc we used GNU bison to generate a pure (=reentrant) parser for perly.y.
So our yacc is really the following script:

We still got a few errors during make test.
Some of them are the result of using bison.
Bison prints parser error instead of syntax error,
so we may ignore them.
The following list shows our errors,
your results may differ:

First you get the BS2000 commandline prompt ('*').
Here you may enter your parameters,
e.g.
-e 'print "Hello World!\\n";' (note the double backslash!) or -w and the name of your Perl script.
Filenames starting with / are searched in the Posix filesystem,
others are searched in the BS2000 filesystem.
You may even use wildcards if you put a % in front of your filename (e.g.
-w checkfiles.pl %*.c).
Read your C/C++ manual for additional possibilities of the commandline prompt (look for PARAMETER-PROMPTING).

There appears to be a bug in the floating point implementation on BS2000 POSIX systems such that calling int() on the product of a number and a small magnitude number is not the same as calling int() on the quotient of that number and a large magnitude number.
For example,
in the following Perl code:

to get two files containing "Hello World!\n" in ASCII, EBCDIC, ISO Latin-1 (in this example identical to ASCII) respective UTF-EBCDIC (in this example identical to normal EBCDIC). See the documentation of Encode::PerlIO for details.

As the PerlIO layer uses raw IO internally, all this totally ignores the type of your filesystem (ASCII or EBCDIC) and the IO_CONVERSION environment variable. If you want to get the old behavior, that the BS2000 IO functions determine conversion depending on the filesystem PerlIO still is your friend. You use IO_CONVERSION as usual and tell Perl, that it should use the native IO layer:

export IO_CONVERSION=YES
export PERLIO=stdio

Now your IO would be ASCII on ASCII partitions and EBCDIC on EBCDIC partitions. See the documentation of PerlIO (without Encode::!) for further possibilities.