bdfp1m1nProgramming Concepts and Reference

dfspa-Create Work Space

Use this function to obtain and initialize work space linked to the SW00SR slot for a subfile. This space is available while the subfile is open.

Format

void *dfspa(dft_fil *file, dft_spc spc, dft_sps sps);

file
is a pointer to the base address of the SW00SR slot (defined in c$sw00sr.h) of the subfile that you want to access and is returned by the dfopn function.

spc
is the character you want to use to initialize the work space.

sps
is the size of the space, which can be a maximum of 3952 bytes.

Entry Requirements

None.

Normal Return

The address of the space that the TPFDF product has provided. The TPFDF product also loads this address in the SW00WKA field of the SW00SR slot.

Error Return

None.

Programming Considerations

Examples

The following example creates a 400-byte area filled with space characters. The TPFDF product puts a pointer to the space in SW00WKA.

dft_fil *file_ptr;

  ·
  ·
  ·
dfspa(file_ptr, ' ', 400);

Related Functions

dfopn-Open a Subfile.