$DSCALL OPT=WRITE

Writes one or more records to an open data set.

&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=WRITE 
             DATA= { * | variable_name [ , variable_name,... ] | prefix*} 
           { DD=DD_name | ID=path_name } 
           [ COUNT= number ] 
           [ TRUNCATE= number ]

This call is used to write data contained in variables to a data set or member of a PDS. The procedure must have an open path to the data set or PDS member to write to it (use $DSCALL OPT=OPEN to open a path).

Operands:

Return Codes:

Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.

Example: OPT=WRITE

&$DSDATA1 = REC1 
&$DSDATA2 = REC2 
&$DSDATA3 = REC3 
&$DSDATA4 = REC4 
EXEC $DSCALL OPT=WRITE ID=SYSPATH COUNT=4 DATA=*


Copyright © 2009 CA. All rights reserved.