home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / VMUNZIP.ZIP / VMUNZIP.DOC < prev    next >
Encoding:
Text File  |  1989-08-05  |  12.8 KB  |  253 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.           This is the read me file for VMUNZIP. VMUNZIP is based mainly on
  9.           the Turbo Pascal program UNZIP(tm) by Samuel H. Smith. The CRC
  10.           checking is based on that in the DEZIP package by R.P. Byrne. I
  11.           wish to give my thanks to these two people, especially for
  12.           releasing the source to their programs. Without their generosity
  13.           and willingness to share their effort, this program would not
  14.           have been possible.
  15.  
  16.           VMUNZIP is designed to run on IBM's VM/CMS operating system. It
  17.           will unzip all files compatible with PKZIP(tm) release 0.92, as
  18.           of July, 1989. The program is written totally in IBM's VS Pascal
  19.           version 1.0 . Complete source code is included. It was written
  20.           and debugged on an HPO 4.2 system. However, it should be
  21.           executable on any version of VM, including VM/XA. Due to the
  22.           considerable differences in file structure and internal character
  23.           code between the IBM PC and the 370 mainframe, the files produced
  24.           by this program are generally not directly usable. A companion
  25.           program is therefore distributed along with VMUNZIP. It is APRINT
  26.           (for Ascii PRINT).
  27.  
  28.           VMUNZIP assumes that you can somehow upload ZIP files from an IBM
  29.           PC to your VM/CMS system. This document does not attempt to
  30.           document this upload facility. My testing was done by using the
  31.           IBM file transfer facility generally called IND$FILE as well as
  32.           Relay/VM. When uploading the ZIP file to VM/CMS, you must be sure
  33.           that the CMS file type is PCZIP. You must also be sure that the
  34.           record format is fixed and that the lrecl is 1. VMUNZIP does not
  35.           validate this, but will fail with some sort of error message if
  36.           these conditions are not met. In addition, the file MUST reside
  37.           on your A disk. All extracted files are placed on the A disk. It
  38.           is your responsibility to make sure that sufficient free space
  39.           exists on your A disk.
  40.  
  41.           Since the IBM PC does not have records in the VM/CMS sense, each
  42.           file extracted is given a record format of fixed and a record
  43.           length of 1. The the data in the extracted files are not
  44.           translated in any way. They remain as they were on the PC.
  45.           Therefore it is your responsibility to translate this data so
  46.           that it is in the form that you need. Since the main use that I
  47.           envision for this is in the uploading of printable data, I have
  48.           written a program which will read the extracted files written by
  49.           VMUNZIP , break it into records, translate it as best as possible
  50.           into EBCDIC and spool it to the CMS virtual printer. This is the
  51.           APRINT program.
  52.  
  53.           Installation instructions. Please note that throughout this
  54.           discussion, I assume that you are fairly familiar with VM/CMS and
  55.           the various standard CMS command available. I also assume that
  56.           you are knowledgeable in the area of doing file uploads on your
  57.           system.
  58.  
  59.              1.  On your PC, use an UNZIP type program to extract the files
  60.                  from the VMUNZIP.ZIP file. There are seven files in this
  61.                  archive. They are VMUNZIP.PAS, VMUNZIP.PMD, APRINT.BAL,
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.                  APRINT.PMD, CHECK.EXC, UNZIP.DOC and VMUNZIP.DOC. Since
  70.                  this is the VMUNZIP.DOC file, you have probably already
  71.                  done this.
  72.  
  73.              2.  Upload the files extracted in step 1. There are two types
  74.                  of files. VMUNZIP.PAS, APRINT.BAL, CHECK.EXC, UNZIP.DOC
  75.                  and VMUNZIP.DOC are pure printable files and may be
  76.                  uploaded using the your upload facility's ASCII to EBCDIC
  77.                  translation. The VMUNZIP.PMD and APRINT.PMD files are
  78.                  special. The are CMS MODULEs (executable programs) which
  79.                  have been packed with the standard CMS COPYFILE program.
  80.                  They must be uploaded so that they fixed length files with
  81.                  an lrecl of 1024. If this is not done properly, they will
  82.                  be unusable! An example session of how I did this follows:
  83.  
  84.              3.  On the PC,  I logged on to the VM/CMS system at work. I
  85.                  was using an Attachmate 3278 coax emulator card along with
  86.                  the Attachmate software. I issued the following commands
  87.                  on the PC.
  88.  
  89.                     a.  pkunzip vmunzip
  90.  
  91.                     b.  send vmunzip.pas vmunzip pascal (ascii crlf
  92.  
  93.                     c.  send vmunzip.doc vmunzip document(ascii crlf
  94.  
  95.                     d.  send aprint.bal aprint assemble(ascii crlf
  96.  
  97.                     e.  send check.exc check exec (ascii crlf
  98.  
  99.                     f.  send unzip.doc unzip document(ascii crlf
  100.  
  101.                     g.  send vmunzip.pmd vmunzip module(recfm f lrecl 1024
  102.  
  103.                     h.  send aprint.pmd aprint module(recfm f lrecl 1024
  104.  
  105.                  Once the files were on the mainframe, I switched to the
  106.                  mainframe session and issued the following CMS commands:
  107.  
  108.                     a.  copy vmunzip module a(unpack
  109.  
  110.                     b.  copy aprint module a(unpack
  111.  
  112.                  That is all there is to the installation
  113.  
  114.           Now that VMUNZIP is installed on your system, you will probably
  115.           want to use it. The first thing that you need to do is to upload
  116.           the ZIP file that contains the files that you want. You must
  117.           upload this file so that it goes onto your CMS A disk as having
  118.           fixed length records with a record length of 1. If you are using
  119.           the "send" command, the syntax is "SEND pcfile.ZIP cmsname PCZIP
  120.           A(RECFM F LRECL 1". Please note that the CMS file type MUST be
  121.           PCZIP! Also notice that the CMS file must reside on your A disk
  122.           or an extension of your A disk. Once you have gotten the file
  123.  
  124.  
  125.  
  126.                                         - 2 -
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.           onto your A disk, you can extract the members by entering
  135.           "VMUNZIP cmsname". This will create one or more output files,
  136.           again on your A disk. The output file names are as close to the
  137.           PC file names as is possible under VM/CMS. This means that the
  138.           path within the name, if any, is ignored. Also, any characters in
  139.           the PC file name or extension which are not valid in a CMS file
  140.           name are translated to pound signs. If the PC file extension is
  141.           blank, the CMS filetype becomes $EXTRACT. This is because the
  142.           filetype under CMS cannot be blank. You can only specify one
  143.           PCZIP file name. You can optionally enter an option. You do this
  144.           by entering "VMUNZIP cmsname ( option". Where "option" can be one
  145.           of the following: PROMPT - this is the default. It indicates that
  146.           you want to be prompted before VMUNZIP overwrites an existing
  147.           file. REPLACE - this indicates that you want VMUNZIP to extract
  148.           all files from the PCZIP file and simply overwrite any files that
  149.           may already be on you A disk without warning. BYPASS - this
  150.           indicates that you want VMUNZIP to not extract any files from the
  151.           PCZIP if a file of that name already exists. You will get a
  152.           message to the effect that the file was skipped.
  153.  
  154.           As an example, suppose that you have uploaded a ZIP file to your
  155.           A disk with the CMS name of TEST PCZIP A. Further suppose that
  156.           this ZIP file contains three files whose PC-DOS names were, in
  157.           order, TEST1.DOC MYSTUFF.PAS and FOO.BAR. You issue the CMS
  158.           command "VMUNZIP TEST". When the command finishes, assuming no
  159.           errors, you will have three new files on your A disk. They will
  160.           be "TEST DOC A1", "MYSTUFF PAS A1" and "FOO BAR A1".
  161.  
  162.           As previously mentioned, the data in the extracted files remains
  163.           exactly as it was on the PC. That is, there is no translation
  164.           from ASCII to EBCDIC. As is, this is probably not very useful.
  165.           That is why the APRINT program is also included. This is a simple
  166.           CMS program written in 370 assembler. It can read the extracted
  167.           files and do a fair job of translating the data into print
  168.           records. This program cannot handle any sort of fancy formatting.
  169.           It recognizes only three control characters. These are the CR
  170.           (0x0d), the LF (0x0a), and the FF (0x0c) characters. All other
  171.           control characters are translated to blanks. The maximum line
  172.           length allowed by this program is 132 characters + 1 carriage
  173.           control character. If a line exceeds this limit, it is broken up
  174.           into two or more lines with a maximum of 132 characters. The only
  175.           carriage control recognized is the FF character which is
  176.           translated to a skip to channel 1 code. A line is considered to
  177.           be all characters between any of the three recognized control
  178.           characters. Since the PC usually delimits lines with a CR/LF
  179.           pair, the code is written so that a LF after a CR is ignored.
  180.           However, multiple LFs in a row are translated to multiple print
  181.           lines. This program directs its output to the CMS virtual
  182.           printer. It issues a CLOSE PRT command before it starts writing
  183.           lines and after it finishes. There is no way to put data directly
  184.           to disk. However you can accomplish this by spooling your virtual
  185.           printer to your virtual reader (CP SP PRT *), then using either
  186.           the READ or DEPRINT command to read the file from your virtual
  187.           reader onto your A disk. The READ command should be used for
  188.  
  189.  
  190.  
  191.                                         - 3 -
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.           files which do not contain carriage information, such as source
  200.           code. The DEPRINT command should be used for files which does
  201.           contains carriage control information, such as documentation.
  202.  
  203.           Going back to the previous example, support that you want the
  204.           data in "MYSTUFF PAS A1" on your A disk in the file named
  205.           MYSTUFF PASCAL A. You can do this as follows:
  206.  
  207.              1.  sp prt close nocont
  208.  
  209.              2.  sp prt *
  210.  
  211.              3.  aprint mystuff pas a
  212.  
  213.              4.  read mystuff pascal a
  214.  
  215.           Note that I have assumed that your CMS reader was empty before
  216.           you started this. If this was not the case, you would need to
  217.           notice the spool file number issued in the VM message that you
  218.           should have gotten after the APRINT command completed. You would
  219.           then make that file the top file in your reader queue by using
  220.           the VM ORDER command.
  221.  
  222.           If you had wanted to simply print the file to the VM system
  223.           printer, you could have simple used the "aprint" step above.
  224.  
  225.           NOTICE - NOTICE - NOTICE - NOTICE - NOTICE
  226.  
  227.           This code is distributed as is with no warranty expressed or
  228.           implied! You assume all liability for loss of data, system
  229.           outages, or any other problems. I have successfully been using
  230.           this code for about a month now with no problems, but I cannot
  231.           guarantee this for you. Also, remember that this code is based on
  232.           the 0.92 version of PKZIP. If you have any problems with this
  233.           code, you can contact me via CompuServe. My id is 72325,1075. I
  234.           will try to fix any bugs in the code on a time available basis.
  235.           However I cannot guarantee that bugs will be fixed. A bug in this
  236.           case is defined as the code not working as described in this
  237.           document. In order to do any type of debugging, I will need the
  238.           error message generated, along with any trace back information. I
  239.           will also need a copy of the ZIP file that caused the problem. I
  240.           will attempt to keep this code current with Phil Katz's PKZIP
  241.           program as well as any other ZIP program which has a large
  242.           following. However, to do this, I must have access to the
  243.           algorithms used by the compressor in question. The only reason
  244.           that I could "write" this program was due to the availability of
  245.           Pascal source from Mr. Smith. I am a decent programmer, but I am
  246.           NOT well versed in compression algorithms! Oh, yes, this code is
  247.           totally free. If you modify it or improve it, it would be nice
  248.           for you to share your changes. You got this code for free, please
  249.           be considerate and not charge others.
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.                                         - 4 -
  257.