HP 3000 Manuals

PRINT3270 [ SNA IMF Programmer's Reference Manual ] MPE/iX 5.0 Documentation


SNA IMF Programmer's Reference Manual

PRINT3270 

PRINT3270 
produces a hard copy of the internal screen image.  The PRINT3270
intrinsic cannot be used during LU.T1 emulation or while in transparent
mode.

Syntax 
____________________________________________________________________________
|                                                                          |
|                        I       I       I      CA       I       I         |
|        PRINT3270 (terminalid, fileid, action, location, priority, result)|
____________________________________________________________________________

            

Parameters 

terminalid (input) 

Integer identifying the terminal.  The terminalid is returned in a call
to the OPEN3270 intrinsic.

fileid (output and then input) 

An integer returned by PRINT3270 that uniquely identifies the MPE file to
which the copies of the internal screen image are written.  fileid is
input to all subsequent calls to PRINT3270.

action (input) 

Integer that determines the action of PRINT3270: 

0 = Open output file.
1 = Print the internal screen image and the location and
    characteristic of each attribute character.
2 = Print the internal screen image as it appears on the
    terminal, with attribute and null characters appearing
    as blanks.
3 = Print the attribute characteristics banner.
4 = Close the file.

location (input) 

40-character string that is printed on the hard copy listing to help you
determine the origin of a particular PRINT3270 call.  If your string is
less than 40 characters long, pad it with blanks until it contains
exactly 40 characters.  Any non-printing character is printed as a blank.
The contents of  location is printed if action is set to 1 or 2.

priority (input) 

Integer specifying the output priority, which controls the order in which
files are produced when several files are waiting for the same device.
The value of priority can be from 1 through 13.  Printing is deferred
ifpriority is less than the current system outfence set by the console
operator.  The  priority parameter is especially useful for deferring or
cancelling the output from PRINT3270.

The priority parameter works only when action = 0; if a value other than
0 is used, priority is not checked.  The  priority parameter is passed to
the FOPEN intrinsicas the output priority value in the numbuffers 
parameter.  For more information on priority, see the description of the
FOPEN intrinsic in the MPE V Intrinsics Reference Manual.

You may override the value in the priority parameter by specifying a file
equation before starting your program.  The formal file designator is
LOGIMF. 

result (output) 

The following values can be generated by the PRINT3270 intrinsic:

      0 = Successful completion.
      1 = Device not open.
      9 = Host modified screen since the last receive
          request. (MPE V only) 
     22 = BASIC calling sequence error has occurred.
     25 = Intrinsic call made while in split stack
          mode.
     26 = Intrinsic call made with the parameter value
          out of bounds.
     29 = Called intrinsic with a request already
          outstanding.  (No-wait I/O only) 
     30 = Internal error occurred in IMF intrinsic.
     53 = Invalid intrinsic called for data stream mode
          device.
     60 = Invalid spool file priority. Value must be
          between 1 and 13 inclusive.
     61 = Failed to open PRINT3270 spool file.
     62 = Failed to write to PRINT3270 spool file.
     63 = The action parameter must be an integer
          between 0 and 4.
     64 = Wrong file type for PRINT3270 output file.
     65 = Failed to close PRINT3270 output spool file.
     66 = Failed to open CATIMF.PUB.SYS.
     67 = GENMESSAGE failed to extract message.
     68 = Out of stack space.  Increase your maxdata
          size.

Description 

The PRINT3270 intrinsic is a powerful program testing aid that you can
call at any time unless a TRAN3270 or RECV3270 call is outstanding.  The
PRINT3270 intrinsic sends a copy of your current internal screen image to
a spooled output file.  An appropriate time to call PRINT3270 is after a
RECV3270 call, when the host has modified your internal screen image.
The printed output helps you verify exactly what has been changed.

The action parameter determines the output of the PRINT3270 intrinsic.
The values for the action parameter, and their effects on the output of
the PRINT3270 intrinsic, are as follows:

action = 0
Opens the output file.  Your first call to PRINT3270 must specify
action = 0.

action = 1
Prints the internal screen image.  This format is designed for program
testing and shows all attribute character locations as overprinted
characters.The hexadecimal values of the first 16 attribute characters
(per row) are printed to the right of the internal screen image.Null
characters are printed as tildes (~) to distinguish them from blank
characters.  Tildes may appear as dashes (-) on some printers.  Two
screen images are printed per page with a border indicating column and
row numbers.  The cursor is represented by an underline character.The
cursor location is written at the bottom of the internal screen image,
along with the state of the keyboard (enabled or disabled).

 action = 2
Prints the internal screen image.This format is a clean print, with
attribute and null characters appearing as blank characters.  This format
resembles the internal screen image as it would appear on a terminal
screen.  You may wish to use this format to document host transmissions.
This format prints only one screen per page with no border and no cursor.

 action = 3
Prints an initial page that defines all possible hexadecimal values for
attribute characters and the meaning of each value.  After opening your
output file with action = 0, call the PRINT3270 intrinsic again with
action = 3. 

 action = 4
Closes the output file.


NOTE A spooled file does not print until you call the CLOSE3270 intrinsic or until you call PRINT3270 with the action parameter set to 4.
Your first call to the PRINT3270 intrinsic must specify an action value of 0 to open the output file. You can use more than one spooled output file within the same program, because the fileid parameter provides a unique identifier each time PRINT3270 is called with action= 0. By opening more than one output file, you can segregate internal screen images into separate files based on the data they contain or the devices to which they are directed. The formal file designator for the output file that PRINT3270 opens is LOGIMF. The device class of LOGIMF is "LP." If device class "LP" is spooled, the output of PRINT3270 will be sent to the spooler. The LOGIMF file can be routed to disc instead of to the spooler with the following file equation: :FILE LOGIMF,NEW;DEV=DISC;REC=-133,,,ASCII;NOCCTL;SAVE The LOGIMF file may be equated to another file, which must have a record size of 133 bytes and contain ASCII data. It may not be a KSAM file. You can use the location parameter, which is a character string, to identify the origin of the printed screen images. If you use a narrow width paper you should set the location parameter to 40 blanks.
NOTE The HP 2608 printer characteristics prevent correct overprinting of attribute characters in the same row as the cursor. This affects all attribute characters in columns up to and including the column where the cursor is located. The overprint will appear as a capital `H' in this circumstance. The hexadecimal attribute value on the right will help to determine that the `H' is an attribute character rather than a capital `H' text character.
The PRINT3270 intrinsic cannot be used during LU.T1 emulation or while in transparent mode. Use the PRINT3270 intrinsic only in non-transparent mode, during LU.T2 and LU.T3 sessions. COBOL Calling Sequence CALL "CPRINT3270" USING TERMINALID FILEID ACTION LOCATION PRIORITY RESULT. (on MPE V and in compatibility mode on MPE XL) CALL INTRINSIC "PRINT3270" USING TERMINALID FILEID ACTION LOCATION PRIORITY RESULT. (in native mode on MPE XL) All parameters are numeric data items except LOCATION, which is an alphanumeric data item. FORTRAN Calling Sequence CALL PRINT3270 (TERMINALID, FILEID, ACTION, LOCATION, PRIORITY, RESULT) All parameters are integer variables except LOCATION, which is a character array. BASIC Calling Sequence CALL BPRINT3270 (T, F2, 03, L$, P2, R) (on MPE V and in compatibility mode on MPE XL) CALL PRINT3270 (T, F2, 03, L$, P2, R) (in native mode on MPE XL) All parameters are integer variables except L$, which is a string variable. SPL Calling Sequence PRINT3270(TERMINALID, FILEID, ACTION, LOCATION, PRIORITY, RESULT) All parameters are integer variables except LOCATION, which is a byte array. Pascal Calling Sequence PRINT3270 (TERMINALID, FILEID, ACTION, LOCATION, PRIORITY, RESULT); All parameters are short integer variables except LOCATION, which is a packed array of char. C/XL Calling Sequence PRINT3270 (&TERMINALID, &FILEID, &ACTION, LOCATION, &PRIORITY, &RESULT); All parameters are of type short, except LOCATION, which is an array of characters (a pointer to a char). Pascal Program Excerpts Following are excerpts from a Pascal program that calls SNA IMF intrinsics. For examples of complete Pascal programs in non-transparent and transparent modes, see appendix F, "Sample Programs." {************************** Global Declarations **************************} type shortint = -32768..32767; { global type, two bytes (half word) } . . . var fileid : shortint; terminalid : shortint; { value returned by OPEN3270 intrinsic } result : shortint; . . . procedure PRINT3270; intrinsic; . . . {************************** Local Declarations **************************} var action : shortint; { All PRINT3270 variables except } location : packed array[1..40] of char; { fileid, terminalid, and result } priority : shortint; { are local. } . . . {************** Variable Initialization and Intrinsic Call **************} action := 0; location := 'SNAIMF Screen Image'; priority := 4; PRINT3270 (terminalid, fileid, action, location, priority, result);


MPE/iX 5.0 Documentation