PRINT Keyword with Response Indicator or *PGM Special Value for Display Files

If you specify the PRINT keyword with a response indicator, the OS/400 program returns control to your program with the specified response indicator set on. No data is received from the device. The keyboard is locked until your program sends another output operation to the display file. There is no difference in the print function between local and remote work stations. If you specify *PGM, the OS/400 program returns control to your program. The only difference between these two forms is the response indicator; all other processing is the same.

The optional text for the response indicator form is included on the computer printout created at program compilation time to explain the intended use of the indicator. This text functions only as a comment. The apostrophes are required. If you specify more than 50 characters between the apostrophes, the text is truncated to 50 characters on the program computer printout.

Figure 224 shows how to specify the PRINT keyword with a response indicator.

Figure 224. Specifying the PRINT Keyword with Response Indicator

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A                                      PRINT(01 'User presses Print key')
00020A          R RECORD1
     A

Figure 225 shows how to specify the PRINT keyword with the *PGM special value.

Figure 225. Specifying the PRINT Keyword with the *PGM Special Value

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A                                      PRINT(*PGM)
00020A          R RECORD1
     A