The SoftPack utility (release 4.00, January 2003)
As mentioned above, the Rexx2Nrx package had been developed using it's own CROSS-Compilation features. Those features imply, that you may develop an application on one machine (for instance an IBM CMS System), using the compilers and utilities available there, and later have a mechanism available to PORT this software (i.e. the program source files and all control files involved), from the SOURCE machine to the TARGET machine (for instance from the IBM VSE/CMS HOST to the PC-Server).
One very old piece of software, which has been developed years ago, is used to collect a 'SET of releated programs and files' on the source machine, and put it to a single file: The SOFTPACK-file.
A simple example may explain this process.
For example, on the SOURCE machine (in this case IBM CMS), the following files are present:
-- get filelist of CMS (COB2RW)
The sample is an implementation of a COBOL REPORT WRITER, originally written in IBM classic compiled REXX, and now ported from IBM compiled Rexx to Java using Rexx2Nrx&NetRexx.
on the IBM CMS System, the respective source files are:
The SOFTPACK utility is now used to put all the involved source files into one SOFTPACK-file:
EXEC SOFTPACK COB2RW.FILELIST
As you see, all files mentioned in the FILELIST are packed together, Furthermore, and more important, all COPY-files of any COBOL program listed, and all %INCLUDED files of all REXX programs mentioned are included for your convenience, as well. Hence, as a matter of fact, your SOFTWARE package is EXPLODED and thus contains all pieces you need to compile the same package again on another machine.
Thus, for our COB2RW example, SOFTPACK will work as follows:
EXEC SOFTPACK COB2RW.FILELIST
The resulting SOFTPACK-File (COB2RW.SOFTPACK, in our case) may then be sent to the target machine with a single file transfer. After the file transfer (for instance IBM -xxxxxxxxx), the SOFTPACK file will arrive on your target computer ( an IBM PC in our case), as COB2RW.SOF.
On this target machine, there is a 'companion' utility, called SOFTUNPK, to unpack the SOFTPACK file on the target machine again. For instance:
SOFTUNPK COB2RW.SOF
This step will UNPACK all individual source package components contained in the :SOF file again - on the target machine, using the appropriate target file naming conventions, of course.
This process i s bi-directional: you may modify your source-files on the target machine, SOFTPACK them again, and send them back to the source machine, or a third machine when you like.
For your convenience and adaption, both the IBM CMS compiled REXX SOURCE code -hopefully simple and straightforward -, as well as the NetRexx and Java equivalents are included in the Rexx2Nrx software distribution. They also may serve as some examples of the usage of the varios FILE I/O routines available in RexxFile (formerly called FILEIO on CMS systems)
One final note: As SOFTPACK by default INCLUDES all COBOL COPY books and REXX %INCLDE files, yoi will have to use the options NOINCLUDE and NOCOPY on the source machine when your would like to suppress this 'parts explosion algorithm'. But the default is to put all necessary pieces together, hence it's quite easy to use.
Feel free to adapt the source code provided for your personal needs, anyway
One final example will show you the power of SOFTPACK in a recent Austrian application:
We are currently porting all of our IBM VM VSE COBOL2 (CICS/DLI) Software to Micro-Focus COBOL, concurrently changing from DL/I to DB2!). Thus, on the CMS machine, we do a
FILEL * COBOL2 G1 (where G1 is the minidisk containing all our souirce COBOL II programs)
in XEDIT, we simply say 'SAVE' to SAVE the generated FILE-List (a very handy CMS XEDIT feature), and as SCN74 is the current USERID, CMS puts. the result of the FILELIST_command to SCN74.FILELIST.
and then:
SOFTP ACK SCN74.FILELIST
packs all the source files (and the included COPY files). to SCN74.SOFTPACK. Transfer to PC, SOFTUNPK. done.
The following is the LOG-File of this action on the SOURCE machine (your HOST machine, if you want)
---> LOG-file
One final note: You will have to use options (NOCOPY NOINLUDE) with SOFTPACK if you don't want SOFTPACK to search for COPY-books(COBOL) or INCLUDE files (IBM compiled REXX), which is done by default otherwise.
But of course, you will be able to SOFTPACK all your COPY and INCLUDE files in a separate step, if you do neither like like nor need the automatics available. ...
.
#
.
.