home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
3x400
/
lftadj.lzh
/
READ-ME.DOC
< prev
Wrap
Text File
|
1980-01-01
|
3KB
|
61 lines
Left Adjust Data (LFTADJDTA) Command
The LFTADJDTA command is designed for use within CL programs to
perform left-adjusting of character data containing leading blanks.
The reason for writing the CMD/PGM was to avoid substring loops
in CL (and other HLLs for that matter) which are normally done on
a character-by-character basis. The implementation in S/38 ASM
makes it possible to perform this function quickly on a data block.
If one wishes to use the CPP in a HLL program, one should specify
two (2) data structures to be used as the parameters. An example
of the RPG III code to perform this function follows:
ISFLDDS DS (positions approximate)
I B 1 20SFLDLN (source field length)
I 3 xxx SRCFLD (source field)
ITFLDDS DS
I B 1 20TFLDLN (target field length)
I 3 xxx TGTFLD (target field)
C CALL 'QCLLADTA'
C PARM SFLDDS
C PARM TFLDDS
The following is a set of instructions for the installation of
the Left Adjust Data (LFTADJDTA) command onto a System/38:
1) Create a physical file named LADPHYF on the S/38 in any
library except QTEMP. No DDS should be specified for this
file. The record length for the file should be specified
at 528 bytes and the file should be capable of holding at
least 67 records.
2) Upload the PC file LFTADJ.DTA into the S/38 file LADPHYF.
Use the PC file LFTADJ.FDF as the file description required
by the upload procedure.
3) Create a save file named LADSAVF on the S/38 in any library.
4) Create and execute the following program:
FLADPHYF IPE F 528 DISK (positions approximate)
FLADSAVF O 528 DISK
ILADPHYF AA 01
I 1 528 DATA
OLADSAVF D 01
O DATA 528
** Ensure, prior to execution, that the files LADPHYF and
LADSAVF are in libraries contained in the library list
or have the appropriate overrides in effect.
5) Execute the following Restore Library (RSTLIB) command:
RSTLIB SAVLIB(LADLIB) SAVF(LADSAVF.library) MBROPT(*ALL)
6) In the library LADLIB one should find the following objects:
LFTADJDTA - Command object to Left Adjust Data.
QCLLADTA - Program object. The CPP for the LFTADJDTA CMD.
CMDSRC - Source code for the command object.
ASMSRC - Source code for the program object.
7) No warranties expressed or implied. Enjoy.