Job Execution

pre-send jobs

HULFT can run a user job upon acknowledging the Send File or the Send Request.

After the successful end of the user job that was run by HULFT (that is, when the severity of the user job does not exceed the value that is specified for the Job Interrupt Severity (JOBSTOPSEV); refer to System Environment Settings), the Send processing starts. The Send processing cannot be carried out if the job ends unsuccessfully. For example, you can run a user job that creates sending data upon acknowledging the Send File or the Send Request and utilize the data that has been created by the job for data sending as soon as the data becomes available.

To use the Pre-send Job function, specify a job, for which you have already registered a record in the Job Information, for the Pre-send Job ID (PREJOBID) in a record of the Send Management Information.

Post-send Job or Post-receive Job

HULFT can run a user job upon ending the Send processing or the Receive processing. You can let HULFT run a different job depending on whether the Send processing or the Receive processing ends successfully or unsuccessfully.

To run a user job after the successful end of the Send processing or the Receive processing, specify a job, for which you have already registered a record in the Job Information, for the Successful Job ID (JOBID) in a record of the Send Management Information or the Receive Management Information.

To run a user job after the unsuccessful end of the Send processing or the Receive processing, specify a job, for which you have already registered a record in the Job Information, for the Unsuccessful Job ID (ERRJOBID) of the Send Management Information or the Receive Management Information.

Execution results of the Post-send Job and the Post-receive Job are written in the Post-send Job Execution Log file and the Post-receive Job Execution Log file, respectively.

Expansion of Environment Variable Substitutions

HULFT let substitutions of environment variables expand in the jobs when it runs the Pre-send Job, the Post-send Job, and the Post-receive Job. The list of substitutions of environment variables that expand is as follows:

Table 2.3 List of Environment Variable Substitutions

Substitution String

Type

Length

Expansion Rules

Pre-send

Post-send

Post-receive

&HOST

*CHAR

8

Expand into the Send Host Name or the Receive Host Name

-

&HOST2

*CHAR

32

Expand into the Send Host Name or the Receive Host Name

-

&FILEID

*CHAR

8

Expand into the File ID

&FILEID2

*CHAR

32

Expand into the File ID

&COUNT

*DEC

15 5

Expand into the number of records representing files processed by sending-side (or receiving-side) transferring

-

&LIBNM

*CHAR

10

Expand into the library name of the Send file or the Receive file

&FILENM

*CHAR

10

Expand into the name of the Send file or the Receive file

&MBRNM

*CHAR

10

Expand into the member name of the Send file or the Receive file

&STATUS

*DEC

15 5

Expand into the Status code of sending or receiving (format: 9999)

Refer to the following for the Status code:

HULFT10 for IBMi Error Codes and Messages : Overview of log information error code

-

&DETAIL

*DEC

15 5

Expand into the Detail code of sending or receiving (format: 9999)

Refer to the following for the Detail code:

HULFT10 for IBMi Error Codes and Messages : Overview of log information error code

-

&SDATE

*DEC

15 5

Expand into the Send Start Date or the Receive Start Date (*1)

-

&EDATE

*DEC

15 5

Expand into the Send End Date or the Receive End Date (*1)

-

&STIME

*DEC

15 5

Expand into the Send Start Time or the Receive Start Time (Format: HHMMSS)

-

&ETIME

*DEC

15 5

Expand into the Send End Time or the Receive End Time (Format: HHMMSS)

-

&MSG0

*CHAR

32

Expand into the Message 0

&MSG1

*CHAR

32

Expand into the Message 1

&MSG2

*CHAR

32

Expand into the Message 2

&MSG3

*CHAR

32

Expand into the Message 3

&MSG4

*CHAR

32

Expand into the Message 4

&MSG5

*CHAR

32

Expand into the Message 5

&MSGL0

*CHAR

32

Expand into the Long Message 0

&MSGL1

*CHAR

32

Expand into the Long Message 1

*1

:

The date format specified for the Date Format (DATEFMT) in the System Environment Settings applies to the date format (the order of the year, month, and day) of the Post-send Job and the Post-receive Job.

Note

Specifying 'J' (Successful Job Completion) for the Notification of the Receive Management Information (JOBWAIT) lets '&EDATE' and '&ETIME' expand into the date and time of transfer completion, not into the date and time of Post-receive Job completion.

 

To assign values to parameters, it is necessary to use the substitutions in both the Job Information and the CL programs.

<Description for Job Information>

CALL library name/program name PARM(&HOST2 &FILEID &LIBNM &FILENM &MBRNM 
   &STATUS &SDATE &STIME &EDATE &ETIME)

<Description for CL program>

START:PGM PARM(&HNM &ID &LNM &FNM &MNM &STATUS &SDATE &STIME &EDATE &ETIME) 

   DCL VAR(&HNM)    TYPE(*CHAR) LEN(32) 
   DCL VAR(&ID)     TYPE(*CHAR) LEN(8) 
   DCL VAR(&LNM)    TYPE(*CHAR) LEN(10) 
   DCL VAR(&FNM)    TYPE(*CHAR) LEN(10) 
   DCL VAR(&MNM)    TYPE(*CHAR) LEN(10) 
   DCL VAR(&STATUS) TYPE(*DEC) LEN(15 5) 
   DCL VAR(&SDATE)  TYPE(*DEC) LEN(15 5) 
   DCL VAR(&STIME)  TYPE(*DEC) LEN(15 5) 
   DCL VAR(&EDATE)  TYPE(*DEC) LEN(15 5) 
   DCL VAR(&ETIME)  TYPE(*DEC) LEN(15 5) 
                      : 
                      :

Character conversion for environment variables

 

For the environment variables for a job execution, character conversion has been performed based on a combination of "HULFT Character Set" for the System Environment Settings file and the CCSID value for the job execution environment.

From Ver.8.4.2 or higher, you can select the character conversion method for this conversion.

According to the value set for Character Conversion Mode of Job Environment Variables (JOBENVCNVMODE) for the System Environment Settings, the following conversions are applied:

Compatible Mode (0)

The behavior is the same as that of HULFT for IBMi lower than Ver.8.4.2.

For a job execution, when the characters of environment variables are recognized as lowercase alphabetic characters (a-z) of displayed characters (graphics characters) on CCSID (coded character set ID) for the job execution environment, they are converted to uppercase alphabetic characters (A-Z).

No Conversion Mode (1)

The character codes in environment variables are used without any conversion.

 

For details on the System Environment Settings, refer to Code Conversion Settings.

Conversion example

The conversion examples of environment variables depending on the setting value for Character Conversion Mode of Job Environment Variables (JOBENVCNVMODE) for System Environment Settings are as follows:

= Remarks =

For the character conversion for environment variables, the value for CCSID that is set for the following is used:

Before conversion

"HULFT Character Set" for the System Environment Settings file in the execution environment of HULFT

After conversion

CCSID (coded character set ID) for a job execution

In No Conversion Mode (1) , conversion is not performed regardless of CCSID values.

 

A conversion example for "5026" set for HULFT Character Set and "5026" set for CCSID for a job execution

Figure 2.21 A conversion example for "5026" set for HULFT Character Set and "5026" set for CCSID for a job execution

 

A conversion example for "5035" set for HULFT Character Set and "5035" set for CCSID for a job execution

Figure 2.22 A conversion example for "5035" set for HULFT Character Set and "5035" set for CCSID for a job execution

 

A conversion example for "5026" set for HULFT Character Set and "65535" set for CCSID for a job execution

When CCSID for a job execution is "65535", "5026" of "Default coded character set identifier" is used.

Figure 2.23 A conversion example for "5026" set for HULFT Character Set and "65535" set for CCSID for a job execution

 

A conversion example for "5035" set for HULFT Character Set and "65535" set for CCSID for a job execution

When CCSID for a job execution is "65535", "5026" of "Default coded character set identifier" is used.

If CCSID is "5026", half-width kana "イ (0x62)" is recognized as "a (0x62)" and is converted to A (0xC1)" which is an uppercase alphabetic character.

In the same way, "イ (0x62)," "ウ (0x63)," "エ (0x64)," and "オ (0x65)" are also recognized as lowercase alphabetic characters and are converted to uppercase alphabetic characters.

Figure 2.24 A conversion example for "5035" set for HULFT Character Set and "65535" set for CCSID for a job execution

 

Points to be Noted for Job Execution

If HULFT cannot execute a job (for example, when the Status of the Job Execution Log is 'Unavailable'), check the following points:

Confirmation of authority

Some authorities are not allowed to run jobs. The authorities that are required for individual jobs are as follows:

pre-send jobs

Authority of the user profile that issued the Send File command (UTLSEND)

post-send jobs

Authority of the user profile that started the Send system (in principle, QSECOFR)

post-receive jobs

Authority of the user profile that started the Receive system (in principle, QSECOFR)

For details, refer to HULFT System Startup and Stop.

Verification of Job Information Settings

  • Handling of single quotes (Refer to the following)

    HULFT10 for IBMi Operation Manual : Job Information

  • Setting of Job Description

  • Setting of commands

Existence of Job Description

Check whether the specified job description exists in the library or not as well as verify the contents specified for the Job Description.

Command

Execute the command registered in Job Information in the command line and check whether the command works.