LPRINTF procedure

The LPRINTF procedure writes an informational message to the joblog. It is severity 0 and has no message identifier.

Authorization: See Note below.

Read syntax diagramSkip visual syntax diagramLPRINTF( PRINT_STRING => print-string )

The schema is SYSTOOLS.

print-string
A character or graphic string containing the information to be written to the joblog. It can be up to Start of change30,720End of change characters long.

Note

This procedure is provided in the SYSTOOLS schema as an example of how to write to the joblog using an SQL procedure. Similar to other Db2® for i provided tools within SYSTOOLS, the SQL source can be extracted and used as a model for building similar procedures, or to create a customized version within a user-specified schema.

Services provided in SYSTOOLS have authorization requirements that are determined by the interfaces used to implement the service. To understand the authority requirements, extract the SQL for the service and examine the implementation.

Example

Write a message to the joblog.
CALL SYSTOOLS.LPRINTF('This message sent on '  
                       CONCAT DAYOFWEEK(CURRENT DATE) CONCAT ' at ' 
                       CONCAT CURRENT TIME);
Results in this string in the joblog:
This message sent on Saturday at 04:21 PM