!REPORT.ERROR subroutine
Syntax
CALL !REPORT.ERROR (command, subroutine, code)
Description
Use the !REPORT.ERROR subroutine to print explanatory text for an InfoSphere® DataStage® or operating system error code.
command is the name of the command that used the subroutine in which an error was reported.
subroutine is the name of the subroutine that returned the error code.
code is the error code.
The general format of the message printed by !REPORT.ERROR is as follows:
Error: Calling subroutine from command. system error
code: message.text.
system is the operating system, or InfoSphere DataStage.
Text for values of code in the range 0 through 9999 is retrieved from the operating system. Text for values of code over 10,000 is retrieved from the SYS.MESSAGES file. If the code has no associated text, a message to that effect is displayed. Some InfoSphere DataStage error messages allow text to be inserted in them. In this case, code can be a dynamic array of the error number, followed by one or more parameters to be inserted into the message text.
Examples
CALL !MESSAGE (KEY,USERNAME,USERNUMBER,MESSAGE,CODE)
IF CODE # 0
THEN CALL !REPORT.ERROR
('MY.COMMAND','!MESSAGE',CODE)
If code was IE$SEND.REQ.REC, !REPORT.ERROR would display the following:
Error calling "!MESSAGE" from "MY.COMMAND" UniVerse
error 1914: Warning: Sender requires "receive"
enabled!
The next example shows an error message with additional text:
CALL !MESSAGE (KEY,USERNAME,USERNUMBER,MESSAGE,CODE)
IF CODE # 0
THEN CALL !REPORT.ERROR
('MY.COMMAND','!MESSAGE',CODE:@FM:USERNAME)
If code was IE$UNKNOWN.USER, and the user ID was joanna, !REPORT.ERROR would display the following:
Error calling "!MESSAGE" from "MY.COMMAND" UniVerse
error 1757: joanna is not logged on
!SET.PTR subroutine
Syntax
CALL !SET.PTR (print.channel, width, length, top.margin,
bottom.margin,
mode, options)
Description
Use the !SET.PTR subroutine to set options for a logical print channel. This subroutine provides the same functionality as the SETPTR command.
print.channel is the logical printer number, -1 through 255. The default is 0.
width is the page width. The default is 132.
length is the page length. The default is 66.
top.margin is the number of lines left at the top of the page. The default is 3.
bottom.margin is the number of lines left at the bottom of the page. The default is 3.
mode is a number 1 through 5 that indicates the output medium, as follows:
1 - Line Printer Spooler Output (default).
2, 4, 5 - Assigned Device. To send output to an assigned device,
you must first assign the device to a logical print channel, using
the ASSIGN command. The ASSIGN command issues an auto-
matic SETPTR command using the default parameters, except for
mode, which it sets to 2. Use !SET.PTR only if you have to change
the default parameters.
3 - Hold File Output. Mode 3 directs all printer output to a file
called &HOLD&. If a &HOLD& file does not exist in your
account, !SET.PTR creates the file and its dictionary
(D_&HOLD&). You must execute !SET.PTR with mode 3 before
each report to create unique report names in &HOLD&. If the
report exists with the same name, the new report overwrites.
options are any of the printer options that are valid for the SETPTR command. These must be separated by commas and enclosed by valid quotation marks.
If you want to leave a characteristic unchanged, supply an empty string argument and specify the option NODEFAULT. If you want the default to be selected, supply an empty string argument without specifying the NODEFAULT option.