Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

X 6.2.33.6 Format 6: SET for USAGE IS PROCEDURE-POINTER Data Items




X When this format of the SET statement is executed, the current value of
X the receiving field is replaced by the address value contained in the
X sending field. Additionally, to enable COBOL programs to interoperate
X with C programs via C function pointers, the sending field can be a
X pointer. The pointer is converted to a procedure-pointer and is stored in
X the receiver.


 X  ___ Format 6--SET (USAGE IS PROCEDURE-POINTER Data Items) ______________ 
 X |                                                                        |
 X |          <_______________________________                              |
 X | >>__SET____procedure-pointer-data-item-1_|___________________________> |
   |                                                                        |
 X | >__TO__ _procedure-pointer-data-item-2_ ____________________________>< |
 X |        |_ENTRY__ _identifier-8_ _______|                               |
 X |        |        |_literal-1____|       |                               |
 X |        |_NULL__________________________|                               |
 X |        |_NULLS_________________________|                               |
 X |        |_pointer-data-item-3___________|                               |
   |                                                                        |
   |________________________________________________________________________|

X procedure-pointer-data-item-1, procedure-pointer-data-item-2

X Must be described as USAGE IS PROCEDURE-POINTER.
X Procedure-pointer-data-item-1 is the receiving field.


X identifier-8

X Must be defined as an alphanumeric item such that the value can be a
X program name. For more information, see "PROGRAM-ID Paragraph" in
X topic 3.1.1. For entry points in non-COBOL programs, identifier-8 can
X contain the characters @, #, and, $.


X literal-1

X Must be nonnumeric and must conform to the rules for formation of
X program-names. For details on formation rules, see the discussion of
X program-name under "PROGRAM-ID Paragraph" in topic 3.1.1.


X Identifier-8 or literal-1 must refer to one of the following types of
X entry points:


X The program-name referenced by the SET...TO ENTRY statement can be
X affected by the PGMNAME compiler option. For details, see the IBM
X COBOL Programming Guide for your platform.


X NULL

X NULLS

X Sets the receiving field to contain the value of an invalid address.


X pointer-data-item-3

X Must be defined with USAGE POINTER. You must set pointer-data-item-3
X in a non-COBOL program, to point to a valid program entry point.

Subtopics:



Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.