Skip to main content

Standalone file transfer

What is it?​

A way to run the SMAFT agent inside a regular job step (not as a started task) so a single job can perform a file transfer without a long-running SMAFT server. Use it when you need an ad hoc transfer or want the transfer to live and die with the job.

The SMAFT agent can be run in a job step, using the following JCL:

//GETFILE EXEC PGM=IKJEFT1B,PARM='XPFTAGT' //SYSEXEC DD DISP=SHR,DSN=OPCON.V210004.INSTLIB //SYSTSIN DD DUMMY //SYSTSPRT DD SYSOUT=* //XPSIN DD * SERVER name:port file Source File Name SAVEAS Destination File Name

Standalone file transfer JCL​

DDRequired?Description
SYSEXECYesThis must point to a library containing XPFTAGT, XPFTPARM, and XPRXCRC. In V4.03.02 and higher, the z/OS Agent installs these programs in *hlq.mlq.*INSTLIB.
SYSTSINYesMust be DUMMY.
SYSTSPRTYesThis file will contain any messages from the agent.
XPSINYes
  • This file contains the instructions to the agent. Each line contains a keyword, followed by one or more space, and the value. Leading and trailing spaces will be removed.
  • Keywords are not case sensitive.
  • File and Auth values are case sensitive, others are not.
  • Refer to below for supported keywords.
  • A line whose first word is * is treated as a comment.
XPSOUT or user defined nameNoThis file will be used if no SaveAs keyword is supplied. It can be allocated to any sequential file, including SYSOUT or generation data sets.

Keywords table for standalone file transfer​

KeywordRequired?ValuesDefaultNotes
ServerYesThe name or IP address of a SMAFT server, followed by a colon (:) and port number.NoneIf then server name is used, it must be resolvable to an IP address.
FileYesThe name of the source file name.None 
AuthNoThe security code under which to obtain access to the file in the server.Null (the empty string)The format is server specific. Consult the necessary documentation.
SaveAsNoThe dataset name to be used for the output file, or DD:ddname to write the data to a user defined DDname.DD:XPSOUTIf a dataset name is used, it will be qualified with the prefix defined for the active user. If that is not desired, enclose the name in single quotes. If the DD: form is used, the following keywords are ignored:
  • Collision
  • LRECL
  • RECFM
SourceDataTypeNoThe data type of the file on the source machine:
  • Binary
  • EBCDIC
  • ASCII
  • Default Text
Default TextIf Binary is chosen for SourceDataType, DestDataType will be forced to binary.
DestDataTypeNoThe data type to be used locally. The values are the same as SourceDataType.EBCDIC 
CollisionNoWhat to do if the SaveAs dataset name exists:
  • Do Not Overwrite
  • Overwrite
  • Append
  • Backup then Overwrite
  • Backup then Append
Do Not OverwriteFor the Backup options, the agent calls the XPFTBACK REXX program with the name of the existing dataset before it overwrites or appends. If XPFTBACK is not found or returns a non-zero value, the transfer ends.
LRECLNoThe logical record length of the output dataset.The smallest value that will hold the longest input record 
RECFMNoThe record format of the output dataset:
  • F B
  • V B
  • F
  • V
F B for a stream without record separators; otherwise V BIf the SaveAs dataset already exists, the agent uses its existing RECFM.
CompressionNoN, P, or R. Only the first character is used.NCompression is not supported. A value of R ends the transfer with return code 16. A value of P sets return code 4 if FailIfPref is not N.
EncryptionNoN, P, or R. Only the first character is used.NEncryption is not supported. A value of R ends the transfer with return code 16. A value of P sets return code 4 if FailIfPref is not N.
FailIfPrefNoN or any other value. Only the first character is used.NIf not N, a Preferred (P) Compression, Encryption, or DeleteSource option that cannot be honored is reported as an error.
BandwidthNoA bandwidth value passed to the server.GT2048
DeleteSourceNo
  • No
  • Preferred
  • Required
NoRequests that the server delete the source file. Values are matched by their leading characters. If the server does not support delete, Required ends the transfer with return code 16, and so does Preferred if FailIfPref is not N.