PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > IFSPUT command
IFSPUT command

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('
<
Folder and file name on AS/400
[; Mode
=*ALL ]
[; Append ]
[; Text ]
[; RecIO[=nombre] ]
')

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).
Use the system command WRKLNK to know the folder hierarchy.

If the destination is in shared folders, the path must begin with "/ QDLS /".
Be careful, the IFS and "Shared Folders" do not represent the same thing. The shared folders are in a subdirectory of the IFS: /QDLS.

If the destination file is into an AS400 library, the path to the file can be set as follow :
/QSYS.LIB/MYLIB.LIB/MYFILE.FILE

Or it can also be set as follow :
MYLIB/MYFILE
If option RecIO is set.

 

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.
If the destination file doesn’t exist, it will be created.

Text : By default, the file is transfered as it is, with no conversion.
The option Text will do a conversion from Text to text.

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.
If the RecIO word alone is fixed, with no assigned number, then the file must exist.

 

 

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')
MRGTYPE(*FILE)
FROMFILE(SP_LAYOUT)
OUTPUT(*OUTPRN)
OUTPRN('C:\temp\layout.prn')
ENDOPT(*APP)

 

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 +
&PARM2 &RESULT)

 

 

CRTPRNSPLF

FILE('/QDLS/IMAGES/Layout.prn')
SPLFNAME(PRNSPLF)
USRTXT('Document Word')

RMVLNK

OBJLNK('/QDLS/IMAGES/Layout.prn')

CALL

PGM(LNCCLOSE)

 

See also

 

LCNPRTDOC - CL Command

CRTPRNSPLF - CL Command

DBFXFER