glob: Address z/TPF global field or record
The glob standard C library function is supported but not documented in this information; however, it is documented in z/OS C/C++ Run-Time Library Reference.
Last updated
- Changed for PUT11.
- Changed for PUT05.
- Changed for PUT00.
Format
maketpf_env += system
#include <tpf/tpfglbl.h>
#include <tpf/c_globz.h>
void *glob(unsigned int tagname); - tagname
- This argument, which must be defined in c_globz.h, is treated as an unsigned 32-bit integer that describes the displacement, length, and attributes of the global field or record.
Normal return
A global address. If the tagname parameter describes a global field, the address of the field is returned. If the tagname parameter describes a global record, the address of the global directory for that record is returned. A global directory address can point to either the main storage address or the file address of the record, depending on how globals are defined in your system. If the tagname describes the main storage address directory for a global record, an additional level of indirection is required to address the global record itself.
Error return
Not applicable.
Programming considerations
- Applications must call the tpf_glmod function before modifying a global field or data within a global record that resides in global area GL1 or GL3.
- This function can only be used with z/TPF format-1 globals. To request the address of a z/TPF format-2 global, use the tpf_glWrite and tpf_glClose functions.
Examples
int).
#include <tpf/tpfglbl.h>
#include <tpf/c_globz.h>
int *longglob_ptr = glob(_lfld);struct msgexp.
#include <tpf/tpfglbl.h>
#include <tpf/c_globz.h>
struct msgexp **q05met_directory_ptr = (struct msgexp **)glob(_q05met);
struct msgexp *q05met_ptr = (struct msgexp *)(long)*(int *)q05met_directory_ptr;Related information
- glob_modify: Modify z/TPF global field or record
- glob_sync: Synchronize z/TPF global field or record
- glob_unlock: Unlock z/TPF global field or record
- glob_update: Update z/TPF global field or record
- global: Operate on z/TPF global field
- tpf_filkw: File keyword
- tpf_glmod: Change global storage protection
- tpf_glob_sync_wait: Synchronize z/TPF global field or record and wait.
See z/TPF C functions overview for more information about z/TPF C/C++ language support.