Appendix L. Post Processing (PPA) Substitutable Parameters

One thing that is common to most of the Post Processing Actions (PPAs) is that you want to process the file that has just been sent or received. You can use substitutable parameters to easily specify this.

When performing platform server post processing 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. You can easily specify Post Processing Actions by using the substitutable parameters. You can also define other parameters that can be useful when performing post processing actions.

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 post processing action is performed. Therefore, the parameter %LFILE on the initiator is different than the parameter %LFILE on the responder.

The following table lists the substitutable parameters of post processing actions:

Parameter Supported System Description
%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.

%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.

%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.

%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.

%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.

%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.

%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.

%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.

%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.

%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.

%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.

%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.
%PROC UNIX\Windows\z/OS Defines the process name associated with the file transfer.

The process name can include 1 - 8 characters.

%UDATA UNIX\Windows\z/OS Defines the user data associated with the file transfer.

The user data can include 1 - 25 characters.

%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.

%TIME UNIX\Windows\z/OS Defines the time of the day.

The time is in the format of HHMMSS.

%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.

%JOBN z/OS Defines the name of the platform server started task.

This field can include 1 - 8 characters.

%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.

%ACB z/OS Defines the VTAM ACB name.
%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.

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 post processing 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 bat file.