General Item Routines

In many processing systems these routines would be called ``header handling'' routines. This has led to the rather misleading use of the letters ``hd'' as a component of each of the following routine names.

subroutine rdhda(tno,itemname,value,default) subroutine rdhri(tno,itemname,value,default) subroutine rdhdr(tno,itemname,value,default) subroutine rdhdd(tno,itemname,value,default) subroutine rdhdc(tno,itemname,value,default) subroutine wrhda(tno,itemname,value) subroutine wrhdi(tno,itemname,value) subroutine wrhdr(tno,itemname,value) subroutine wrhdd(tno,itemname,value) subroutine wrhdc(tno,itemname,value) logical function hdprsnt(tno,itemname) subroutine hdcopy(tin,tout,itemname) subroutine hdprobe(tno,itemname,descr,type,n)Before these can be accessed, the data set must be opened with either

The logical function `hdprsnt` can be called to determine if a
particular item exists.

The routine `hdcopy` copies an item from one data set to another.
The item can be
arbitrarily large. `Hdcopy` copies from the data set, whose handle
is given by `tin`, to the data set whose handle is `tout`.

The routine `hdprobe` is used to probe the characteristics of an
item. The string `descr` returns a brief description of the item
(intended for people, not programs, to read). If the item consists of a
single value (or string), the description gives the value. Otherwise
the description gives the type and size of the item (in human readable
form). The string `type` is one of `'nonexistent',
'integer*2', 'integer', 'real', 'double', 'complex', 'character', 'text'`
or `'binary'` (unknown type). The integer `n` gives the number
of elements in the item. If the item does not exist, `type` returns
`'nonexistent'` and `n` returns zero.

2011-08-19