Open topic with navigation

TIBCO® Managed File Transfer Platform Server for z/OS 8.1.0

# Appendix M. Post Processing Action (PPA) Substitutable Parameters

One thing that is common to most of the postprocessing actions is that you want to process the file that has just been sent or received. You can easily specify postprocessing actions by using the substitutable parameters. You can also define other parameters that can be useful when performing postprocessing actions.

When performing Platform Server postprocessing actions (POST_ACTION or PPA), you can define actions to perform when a transfer is completed. Typically, this action is to process a file when the transfer is completed successfully. Additional actions that you might want to take includes deleting or renaming a file when a send transfer is completed successfully or calling a scheduler, such as U7SVC, when a transfer is completed successfully.

The Platform Server runs on different platforms, not all of the parameters are valid on all systems. The substitutable parameters are relative to the system where they are running on. The parameters are substituted only after execution is completed and just before the postprocessing action is performed. Therefore, the parameter %LFILE on the initiator is different than the parameter %LFILE on the responder.

Note: When used in the script program (OSIUC000), PPA substitutable parameters must be defined with two % parameters. This is because the script variables also use %. %% indicates to the scripting program that this is a PPA substitutable parameter and not a scripting variable.

Example: %%DIR

The following table lists the substitutable parameters of postprocessing actions:

Parameter | Supported System | Description
--- | --- | ---
%ACB | z/OS | Defines the VTAM ACB name.
%DIR | UNIX\Windows | Defines the directory name without the file name and drive. For example, if the file name is c:\a\b\c\d\config.txt, %DIR is `a\b\c\d`.
%DRIVE | Windows | Defines the drive name without the file name, directory, and colon. For example, if the file name is c:\a\b\c\d\config.txt, %DRIVE is `c`.
%FILE | UNIX\Windows | Defines the file name without the drive or directory. For example, if the file name is c:\a\b\c\d\config.txt, %FILE is `config.txt`.
%GDATE | UNIX\Windows\z/OS | Defines the Gregorian date without the century. The date is in the format of YYMMDD.
%GDATEC | UNIX\Windows\z/OS | Defines the Gregorian date with the century. The date is in the format of CCYYMMDD.
%HDIR | UNIX\Windows | Defines the highest level sub-directory. For example, if the file name is c:\a\b\c\d\config.txt, %HDIR is `a`.
%HLQ | UNIX\Windows | Defines the high-level qualifier of a file. For example, if the file name is c:\a\b\c\d\config.txt, %HLQ is `config`.
%JDATE | UNIX\Windows\z/OS | Defines the Julian date without the century. The date is in the format of YYDDD.
%JDATEC | UNIX\Windows\z/OS | Defines the Julian date with the century. The date is in the format of CCYYDDD.
%JOBN | z/OS | Defines the name of the Platform Server started task. This field can include 1 - 8 characters.
%LFILE | UNIX\Windows\z/OS | Defines the fully qualified local file name. For example, if the file name is c:\a\b\c\d\config.txt, %LFILE is `c:\a\b\c\d\config.txt`; if the file name is NYTAX.ACCT.DATA.Y2001, %FILE is `NYTAX.ACCT.DATA.Y2001`.
%LLQ | UNIX\Windows\z/OS | Defines the low-level qualifier of a file. For example, if the file name is c:\a\b\c\d\config.txt, %LLQ is `txt`; if the file name is NYTAX.ACCT.DATA.Y2001, %LLQ is `Y2001`.
%NODRIVE | Windows | Defines the file name without the drive. For example, if the file name is c:\a\b\c\d\config.txt, %NODRIVE is `a\b\c\d\config.txt`.
%NOHDIR | UNIX\Windows | Defines the directory name without the highest level sub-directory. For example, if the file name is c:\a\b\c\d\config.txt, %NOHDIR is `b\c\d`.
%NOHLQ | z/OS | Defines the file name without the high-level qualifier. For example, if the file name is NYTAX.ACCT.DATA.Y2001, %NOHLQ is `ACCT.DATA.Y2001`.
%NOLLQ | z/OS | Defines the file name without the low-level qualifier. For example, if the file name is NYTAX.ACCT.DATA.Y2001, %NOLLQ is `NYTAX.ACCT.DATA`.
%NOSDIR | UNIX\Windows | Defines the directory name without the lowest level sub-directory. For example, if the file name is c:\a\b\c\d\config.txt, %NOSDIR is `a\b\c`.
%PROC | UNIX\Windows\z/OS | Defines the process name associated with the file transfer. The process name can include 1 - 8 characters.
%Q01 - %Q22 | z/OS | Breaks up the z/OS file name into individual qualifiers. With this parameter, you can extract a particular qualifier. For example, if a file name is NYTAX.ACCT.DATA.Y2008, %Q01 is `NYDAT`, %Q02 is `ACCT`, %Q03 is `DATA`, %Q04 is `Y2008`, and %Q05 is not defined and therefore defaults to `Q05`.
%QUEUE | UNIX\Windows | Denotes that the preprocessing routine is called and can override some of the transfer parameters. SAMPLIB module FUSPRE shows a sample assembler program that can be used for processing. This parameter is only allowed for preprocessing when the action is CALLPGM. For more information, see the "Preprocessing Actions" section.
%SDIR | UNIX\Windows | Defines the lowest level sub-directory. For example, if the file name is c:\a\b\c\d\config.txt, %SDIR is `d`.
`%SJOBID` | z/OS | Defines the job ID generated when the JCL transfer is submitted.
`%SJOBNAME` | z/OS | Defines the job name used in the JCL JOB statement of transfer.
%SYSID | z/OS | Defines the SMF system ID for the z/OS system where the Platform Server is running. This field can include 1 - 4 characters.
%TIME | UNIX\Windows\z/OS | Defines the time of the day. The time is in the format of HHMMSS.
%TRN | UNIX\Windows\z/OS | Defines the 10-digit Platform Server transaction number. Note: When used on the initiator, the transaction number of the initiator is used; while on the responder, the transaction number of the responder is used.
%UDATA | UNIX\Windows\z/OS | Defines the user data associated with the file transfer. The user data can include 1 - 25 characters.

Note: The leading slash (backslash (\) for Windows and forward slash (/) for UNIX) is typically not included in the substitutable parameters. If the substitutable parameters are not defined (for example %DRIVE on UNIX or z/OS), the parameters are assigned to the parameter names without the leading percent sign (%). Therefore, if you use the parameter %DRIVE on z/OS, the value assigned is `DRIVE`.

## Example

In this example, a file is sent from a UNIX system to a Windows system. The UNIX file is /a/b/c/test.data. The Windows file is c:\temp\test.txt.

The following sample shows how the postprocessing actions (PPA) can be coded if you want to rename the UNIX file and process the Windows file when the transfer is completed successfully.

The following command renames a file in the initiator if the request is completed successfully:

    PPA="S,I,COMMAND,mv %LFILE /%NOSDIR/bkup/%FILE.%GDATEC.%TIME"

This executes the following UNIX command: `mv /a/b/c/test.data /a/b/bkup/test.data.20081231.141516`.

The following command processes a file in the responder if the request is completed successfully:

    PPA="S,R,COMMAND,procfile %LFILE"

This executes the following Windows command: `procfile c:\temp\test.txt`.

Note: In the command, procfile is either an executable file or a batch file.

Copyright © 2003-2021. TIBCO Software Inc. All Rights Reserved.