Chapter Contents |
Previous |
Next |
FPUT |
Category: | External File |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
sysrc=FPUT(file-id,cval<, length>); |
0 | successful |
0 | not successful |
Type: Numeric
Type: Numeric
Type: Character
Type: Numeric
Details |
The unformatted value of cval is passed to FPUT. The number of bytes moved to the FDB is determined by the length of the variable, or by the value of length, if length is specified. The value of the column pointer is then incremented to one position past the end of the new text.
Example |
Move data to the FDB and write it to the external file:
/* Assign the fileref THEFILE to the physical */ /* filename stored in the variable FNAME */ /* and open it in append mode. */ rc=filename('thefile',fname); fileid=fopen('thefile','a'); if (fileid>0) then do; thestring='This is some data.'; rc=fput(fileid,thestring); rc=fwrite(fileid); rc=fclose(fileid); end; else _msg_=sysmsg(); rc=filename('thefile','');
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.