IPF Subroutines

This chapter gives an overview of IPF subroutines and describes how to run them from an application. Details of each IPF subroutine are described in each section.

1. Overview

IPF provides subroutines that can be used to invoke TSO commands and to process data I/Os by screen in an application.

The following is a list of ten IPF subroutines supported in OpenFrame.

Subroutine Description

IPFCMD

Calls TSO commands from an application.

IPFCVS

Closes a logical screen.

IPFMIO

Uses a menu definition in a PDS to process data I/Os through the screen.

IPFMRR

Displays a message string after IPFMIO or IPFMTO has been called. Japanese is supported.

IPFMTO

Uses a menu definition in a PDS to data output through the screen.

IPFOVS/IPFOPN

Opens a logical screen.

IPFPFF/IPFPFS

Releases or resets preset function keys used to move information within the screen.

IPFRIO

Refreshes a logical screen that has been invoked by IPFMI or IPFMTO.

IPF Interface for User Interaction

You can use CALL commands to call IPF subroutines from an application such as a COBOL to send and receive data.

The following example calls IPF subroutines from a COBOL application.

CALL 'IPFCMD' USING RC1 RC2 CMD L.
...
CALL 'IPFOVS' USING PIA LSIA RCA.
...
CALL 'IPFMIO' USING LSIA MIA MDA RCA.
...
CALL 'IPFCVS' USING LSIA RCA.

2. IPFCMD

Calls TSO commands from an application.

  • Syntax

    The following is the syntax of IPFCMD.

    CALL IPFCMD
         RC1
         RC2
         CMD
         L

    The following describes parameters of IPFCMD.

    Item Description

    RC1

    4-byte area for specifying IPFCMD return code.

    RC2

    4-byte area for specifying return code for a TSO command.

    CMD

    L-byte area for specifying TSO command.

    L

    CMD length. (Maximum: 32760)

3. IPFCVS

Closes a logical screen. After IPFCVS is called, you cannot process data I/Os by screen.

  • Syntax

    The following is the syntax of IPFCVS.

    CALL IPFCVS
         LSIA
         RCA

    The following describes parameters of IPFCVS.

    Item Description

    LSIA

    128-byte area for specifying a logical screen to be closed. You must specify the same LSIA specified in IPFOVS and IPFOPN.

    RCA

    4-byte area for specifying a return code to be returned after IPFCVS is executed.

4. IPFMIO

Uses a menu definition in a PDS to process data I/Os by screen.

  • Syntax

    The following is the syntax of IPFMIO.

    CALL IPFMIO
         LSIA
         MIA
         MDA
         [N PMA]
         [CSA]
         RCA

    The following describes parameters of IPFMIO.

    Item Description

    LSIA

    128-byte area used to identify a logical screen to be accessed. The logical screen with the specified LSIA must be open.

    MIA

    16-byte area used to identify a menu. MIA consists of an 8-byte DD name and an 8-byte member name.

    • DD name: DD name of the data set that has the menu definition as member.

    • Member name: Menu definition member name.

    MDA

    Area for specifying input and output data that are actually passed to parameters designated by the menu definition.

    N

    Number of PMAs the properties of which are to be altered. If set to 0, the PMA value is ignored. (N and PMA can be omitted together).

    PMA

    4xN-byte area used to temporarily change parameter field attributes. The following are three areas that comprise PMA. (N and PMA can be omitted together).

    • Parameter number (PNO): 2-byte area for specifying the action parameter number to alter.

    • Attribute character (ATTR): 1-byte area for specifying a new attribute to assign to the parameter.

    • Modification notice (M): Not supported in OpenFrame.

    CSA

    4-byte area used to determine the location of the cursor. The following are two areas that comprise CSA. (Optional)

    • CSA1: 2-byte parameter number referred as the location of the cursor.

    • CSA2: 2-byte area used to determine the position of the cursor relative to the beginning position within the specified parameter.

    RCA

    4-byte area for specifying return code to be returned after IPFMIO is executed.

5. IPFMRR

Displays a message string after IPFMIO or IPFMTO has been called. Japanese is supported.

  • Syntax

    The following is the syntax of IPFMRR.

    CALL IPFMRR
         LSIA
         MA
         MPA
         MDA
         [PNA1 PNA2 ...]
         [CSA]
         RCA

    The following describes parameters of IPFMRR.

    Item Description

    LSIA

    128-byte area used to identify a logical screen to be accessed. The logical screen with the specified LSIA must be open, and you must specify the same LSIA specified in IPFMIO and IPFMTO.

    MA

    Area for specifying a message string to be displayed. You can specify messages in Japanese.

    MPA

    Row number in the logical screen in which the message is to be displayed.

    MDA

    Area for specifying output data to be passed to parameters designated by the menu definition.

    PNAi

    2-byte area for specifying the parameter number to change the attributes. For syntax check only in OpenFrame. (Optional)

    CSA

    4-byte area used to determine the cursor position. For more information, refer to IPFMIO.

    RCA

    4-byte area for specifying return code to be returned after IPFMRR is executed.

6. IPFMTO

Uses a menu definition in a PDS to process data output by screen. Unlike IPFMIO, IPFMTO does not receive user input and returns immediately after displaying the data.

  • Syntax

    The following is the syntax of IPFMTO.

    CALL IPFMTO
         LSIA
         MIA
         MDA
         [N PMA]
         [CSA]
         RCA

    The following describes parameters of IPFMTO.

    Item Description

    LSIA

    128-byte area used to identify a logical screen to be accessed. The logical screen with the specified LSIA must be open.

    MIA

    16-byte area used to identify a menu. MIA consists of an 8-byte DD name and an 8-byte member name.

    • DD name: DD name of the data set that has the menu definition as member.

    • Member name: Menu definition member name.

    MDA

    Area for specifying output data that are to be passed to parameters designated by the menu definition.

    N

    Number of PMAs the properties of which are to be altered. If set to 0, the PMA value is ignored. (N and PMA can be omitted together).

    PMA

    4xN-byte area used to temporarily change parameter field attributes. For more information, refer to IPFMIO.

    CSA

    4-byte area used to determine the location of the cursor. For more information, refer to IPFMIO.

    RCA

    4-byte area for specifying return code to be returned after IPFMTO is executed.

7. IPFOVS/IPFOPN

Opens a logical screen. To process data I/Os by screen, you must call IPFOVS or IPFOPN first.

  • Syntax

    The following is the syntax of IPFOVS/IPFOPN.

    CALL IPFOVS | IPFOPN
         PIA
         LSIA
         [LSDA]
         RCA

    The following describes parameters of IPFOVS/IPFOPN.

    Item Description

    PIA

    4-byte area for specifying Identifier of an application.

    LSIA

    128-byte area for specifying identifier of a logical screen.

    LSDA

    24-byte area for specifying definition area of a logical screen, which contains its properties. (Optional)

    RCA

    4-byte area for specifying return code to be returned after IPFOVS/IPFOPN is executed.

8. IPFPFF/IPFPFS

IPFPFF releases default values of scroll keys (PF7, PF8, PF10, PF11, PF19, PF20, PF22, PF23) in IPF. IPFPFS resets released keys to default values.

  • Syntax

    The following is the syntax of IPFPFF/IPFPFS.

    CALL IPFPFF | IPFPFS
         LSIA
         [PFN1 PFN2 ...]
         RCA

    The following describes parameters of IPFPFF/IPFPFS.

    Item Description

    LSIA

    128-byte area used to identify a logical screen to be accessed. The logical screen with the specified LSIA must be open.

    PFNi

    PF key to be released or to be reset as default. The following is a list of PF keys available.

    • PF7 or PF19: up

    • PF8 or PF20: down

    • PF10 or PF22: right

    • PF11 or PF23: left

    This parameter is optional. If omitted, all PF keys are specified.

    RCA

    4-byte area for specifying return code to be returned after IPFPFF or IPFPFS is executed.

9. IPFRIO

Refreshes a screen for new data I/Os after IPFMIO or IPFMTO is called. IPFRIO is more efficient than IPFMIO and IPFMTO when data I/Os are processed for a screen that has been accessed.

  • Syntax

    The following is the syntax of IPFRIO.

    CALL IPFRIO
         LSIA
         MDA
         [N PMA]
         [CSA]
         RCA

    The following describes parameters of IPFRIO.

    Item Description

    LSIA

    128-byte area used to identify a logical screen to be accessed. The logical screen with the specified LSIA must be open, and you must specify the same LSIA specified in IPFMIO and IPFMTO.

    MDA

    Area for specifying output data that are to be passed to parameters designated by the menu definition.

    N

    Number of PMAs the properties of which are to be altered. If set to 0, the PMA value is ignored. (N and PMA can be omitted together).

    PMA

    4xN-byte area used to temporarily change parameter field attributes. For more information, refer to IPFMIO.

    CSA

    4-byte area used to determine the location of the cursor. For more information, refer to IPFMIO.

    RCA

    4-byte area for specifying return code to be returned after IPFMTO is executed.