z/OS Communications Server: SNA Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using INQUIRE OPTCD=TERMS to generate NIBs

z/OS Communications Server: SNA Programming
SC27-3674-00

The INQUIRE OPTCD=TERMS macroinstruction can be used to build a single NIB or a list of NIBs. When the INQUIRE macroinstruction is issued, the RPL must point to an NIB whose NAME field contains the name of a resource known to VTAM®. An NIB is built for each dependent LU belonging to the set defined by the name in the NIB. For example, if the name of a PU is in the NIB, NIBs are built for all the dependent LUs belonging to that PU; the independent LUs are no longer considered to be subordinate to the PU and are not returned in the NIB list.

When the macroinstruction is issued, the AREA and AREALEN fields in the RPL must designate the location and length of the work area where the NIBs are to be built. Before the macroinstruction is issued, the work area must be set to binary zeros.

If the application program wants the NIBs to be built in dynamically-allocated storage (storage obtained by the application program during execution), INQUIRE should be issued twice. For the first INQUIRE, set AREALEN to 0. This INQUIRE is completed with (RTNCD,FDB2)=(X'00',X'05') (insufficient length), and RECLEN indicates the required length. Obtain the required storage and then issue INQUIRE again with AREALEN set to the proper length.

After the macroinstruction is completed, the RECLEN field in the RPL contains the total length (number of bytes) for all NIBs generated by the macroinstruction. The NAME field of each NIB contains the symbolic name of the LU for which the NIB was generated, and each NIB contains the device characteristics for the LU it represents.

The LISTEND indicator is YES in the last NIB generated; all preceding generated NIBs are LISTEND=NO. Using the symbolic names and device characteristics, the application program can set PROC options and the MODE field in each NIB, and it can set other fields to desired values. The NIBs are then ready to be used for session establishment.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014