home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / 3x400 / lftadj.lzh / READ-ME.DOC < prev   
Text File  |  1980-01-01  |  3KB  |  61 lines

  1. Left Adjust Data (LFTADJDTA) Command
  2.  
  3.   The LFTADJDTA command is designed for use within CL programs to
  4.  perform left-adjusting of character data containing leading blanks.
  5.   
  6.   The reason for writing the CMD/PGM was to avoid substring loops
  7.  in CL (and other HLLs for that matter) which are normally done on
  8.  a character-by-character basis.  The implementation in S/38 ASM
  9.  makes it possible to perform this function quickly on a data block.
  10.  
  11.   If one wishes to use the CPP in a HLL program, one should specify
  12.  two (2) data structures to be used as the parameters.  An example
  13.  of the RPG III code to perform this function follows:
  14.    ISFLDDS   DS   (positions approximate)
  15.    I                       B   1   20SFLDLN (source field length)
  16.    I                           3 xxx SRCFLD (source field)
  17.    ITFLDDS   DS
  18.    I                       B   1   20TFLDLN (target field length)
  19.    I                           3 xxx TGTFLD (target field)
  20.    C                  CALL 'QCLLADTA'
  21.    C                  PARM              SFLDDS
  22.    C                  PARM              TFLDDS
  23.  
  24. The following is a set of instructions for the installation of
  25. the Left Adjust Data (LFTADJDTA) command onto a System/38:
  26.  
  27.  1) Create a physical file named LADPHYF on the S/38 in any
  28.     library except QTEMP.  No DDS should be specified for this
  29.     file.  The record length for the file should be specified
  30.     at 528 bytes and the file should be capable of holding at
  31.     least 67 records.
  32.  
  33.  2) Upload the PC file LFTADJ.DTA into the S/38 file LADPHYF.
  34.     Use the PC file LFTADJ.FDF as the file description required
  35.     by the upload procedure.
  36.  
  37.  3) Create a save file named LADSAVF on the S/38 in any library.
  38.  
  39.  4) Create and execute the following program:
  40.     FLADPHYF IPE F 528     DISK   (positions approximate)
  41.     FLADSAVF O     528     DISK
  42.     ILADPHYF AA 01
  43.     I                  1 528 DATA
  44.     OLADSAVF D   01
  45.     O                DATA   528
  46.  
  47.     ** Ensure, prior to execution, that the files LADPHYF and 
  48.        LADSAVF are in libraries contained in the library list
  49.        or have the appropriate overrides in effect.
  50.  
  51.  5) Execute the following Restore Library (RSTLIB) command:
  52.     RSTLIB SAVLIB(LADLIB) SAVF(LADSAVF.library) MBROPT(*ALL)
  53.  
  54.  6) In the library LADLIB one should find the following objects:
  55.     LFTADJDTA - Command object to Left Adjust Data.
  56.     QCLLADTA  - Program object.  The CPP for the LFTADJDTA CMD.
  57.     CMDSRC    - Source code for the command object.
  58.     ASMSRC    - Source code for the program object.
  59.  
  60.  7) No warranties expressed or implied.  Enjoy.
  61.