Transfer a file from the PC to the AS/400 into a library or into the integrated file system (IFS).
Syntax
CHGVAR |
VAR(&CMD) VALUE('IFSPUT') |
CHGVAR |
VAR(&PARM1) VALUE('Path to the source file on PC') |
CHGVAR |
VAR(&PARM2)
VALUE(' |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT)
|
Parameters |
|
Parameters |
|
Parm1 |
Full path of the PC source file, to be transfered to AS/400.
|
Parm2 |
Full path to the destination file on the AS/400. If
the destination file is in the IFS, the path is given
from the root. (/documents/prod_docs/doc01.pdf). Or
it can also be set as follow :
The path to the destination file can be followed by options, separated by semicolons. The options are separated from the file path by a semicolon. Mode=*ALL :
Give the right for Read and Write to all users. Append :
The data will be append to the file. By default, the destination file is
cleared before the transfer. Text : By
default, the file is transfered as it is, with no conversion. RecIO=Number.
This options says that the file name has the form "LIBRARY/FILE(MEMBER)
". If a value is given with the RecIO option, it is the size of
file records if a new file has to be created.
|
Example
In the following example a document is printed in PRN File. This file is sent to IFS, and latter transferred to a spool file.
LNCPRTDOC |
DOC('C:\Models\layout.doc')
|
CHGVAR |
VAR(&CMD) VALUE('IFSPUT') |
CHGVAR |
VAR(&PARM1) VALUE('C:\Temp\layout.prn') |
CHGVAR |
VAR(&PARM2) VALUE('/QDLS/IMAGES/Layout.prn') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
|
|
CRTPRNSPLF |
FILE('/QDLS/IMAGES/Layout.prn')
|
RMVLNK |
OBJLNK('/QDLS/IMAGES/Layout.prn') |
CALL |
PGM(LNCCLOSE) |
See also
• DBFXFER