| SAS Component Language Dictionary |
| Category: | External File |
| Syntax | |
| Details | |
| Example | |
| See Also |
Syntax |
| sysrc=FAPPEND(file-id<,cc>); |
contains the return code for the operation:
| 0 | |
0 |
contains the identifier that was assigned when the file was opened. If file-id is invalid, the program halts.
| Details |
FAPPEND adds the record currently contained in the File Date Buffer (FDB) to the end of an external file.
Operating Environment Information: z/OS
Records
cannot be appended to partitioned data sets. ![[cautionend]](../../../../common/64368/HTML/default/images/cautend.gif)
| Example |
Use FAPPEND to append a record to a file:
/* Assign the fileref THEFILE to the physical */ /* filename that the user entered in the */ /* field FNAME and open it in append mode. */ rc=filename( 'thefile',fname); fid=fopen('thefile','a'); if (fid>0) then do; /* Append a new record to the file. */ rc=fput(fid,'Data for the new record'); rc=fappend(fid); rc=fclose(fid); end; else do; ...other SCL statements... end; rc=filename('thefile",'');
| See Also |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.