Suprtool

Moving SD Files from MPE to HP-UX

Is there a way to copy SD files from MPE to HP-UX

SDUnix Utility

SDUnix is an MPE program that takes self-describing file information and writes it out to an MPE flat file. This flat file can then be transferred to HP-UX together with the data file so that Suprtool/UX can reference the self-describing information about the fields.

To copy the SD file to the HP-UX machine, it must have an .sd extension and be in the same directory as the data file. For example, if the data filename is /usr/local/data/datafile, the SD file must have the name /usr/local/data /datafile.sd.

The SD file is written out to the same domain (permanent or temporary) as the input file. The SD file contains only one record with the necessary length to store all of the label information.

SDUnix Parameters

All SDUnix parameters are specified via Info = string. There are three parameters:
    input-file  sd-file  LF | NOLF
The first parameter is the name of an MPE self-describing file. The second parameter is the name of the .sd file that SDUnix created.

LF vs. NOLF

Use the third parameter to specify whether the data file has LF (line feed) as the record separator, or whether the file does not use a file separator. If you use FTP to copy the data file to your HP-UX machine, you should specify the NOLF option and be sure to use a binary mode transfer.

Examples

The following section contains examples of creating an SD file on MPE, converting the SD information, and finally copying the two files to an HP-UX machine.

First create an SD file with:

:run suprtool.pub.robelle
>base store,5
Database password [;]?
>get d-inventory
>out dinv,link
>exit
Now you can convert the label information to an .sd file using the SDUnix utility. Note that the data file is the first file passed in the info string.

Specify NOLF if you are using FTP.

:run sdunix.pub.robelle;info="dinv dinvsd nolf"
Use FTP to copy the files to the HP-UX machine.
:ftp dopey
ftp> binary
ftp> exitonerror
ftp> put dinv /users/data/store.dinv
ftp> put dinvsd /users/data/store.dinv.sd
ftp> quit
Now you can use Suprtool/UX to read the SD file.
$ suprtool
>input store.dinv
>form
   File: store.dinv     (SD Version B.00.00)  No line feeds
      Entry:                     Offset
         BIN-NO               I1      1
         LAST-SHIP-DATE       I2      3
         ON-HAND-QTY          I2      7
         PRODUCT-NO           Z8     11
         SUPPLIER-NO          Z8     19
         UNIT-COST            P8     27
         ITEM-DESC1           X20    31
         ITEM-DESC2           X20    51
         ITEM-DESC3           X20    71
         ITEM-DESC4           X20    91
   Entry Length: 110  Blocking: 1
>out dinvfile
>xeq

Installing using FTP

Sdunix program files sdunixcm, sdunixnm program files are shipped with our HP-UX version of Suprtool. 1) Log on as Mgr.Robelle
:hello mgr.robelle,pub
2) Remove old versions of Sdunixnm file
:purge sdunixnm.pub
3) FTP the file from your Unix machine
ftp dopey
binary
cd /opt/robelle/mpe
get sdunixnm sdunixnm;rec=128,1,f,binary;code=nmprg;disc=1400
4) Remove any old versions of Sdunix
:purge sdunix
5) Rename the program file
:rename sdunixnm,sdunix
To install the CM version of SDUnix, specify Sdunixcm as the file name, ;disc=400,1,1 for the file size, and PROG for the filecode.