Chapter Contents |
Previous |
Next |
SAS Companion for the OS/390 Environment |
In interactive mode, if you issue a FILENAME statement or function or attempt to allocate a file with the FNAME window for a file that does not exist, and if you do not specify DISP=NEW, and if the file is not an HFS file, one of the following actions occurs:
Yes
, SAS creates the external file,
using any attributes that you specified in the FILENAME statement. If you
do not specify any attributes, SAS uses the values of the SAS system options
FILEDEV=, FILEVOL=, FILEUNIT=, FILESPPRI=, and FILESPSEC=. See System Options in the OS/390 Environment
for information about these options.
For further information on the FILENAME function, see FILENAME.
FILENAME Statement Syntax |
This section provides only a brief overview of FILENAME statement syntax. For complete information about the FILENAME statement, see FILENAME.
The syntax of the FILENAME statement is
FILENAME fileref <device-type > 'physical-filename' <options . . . >; |
For a concatenation of members in a PDS, an asterisk (*) can be used in a wildcard file specification. The syntax 'physical-filename (*)' applies to all members of the PDS; (beg*) applies to all members or files whose names begin with beg, and (*end) applies to all files whose names end with end.
FILENAME Statement Examples |
The following table provides examples of the FILENAME statement for OS/390.
Type of File | New or Existing File? | Example |
---|---|---|
sequential | existing |
filename raw 'myid.raw.datax' disp=old; |
new |
filename x 'userid.newdata' disp=new space=(trk,(5,1)) unit=3380 volume=xyzabc recfm=fb lrecl=80 blksize=6160; |
|
partitioned | existing |
filename raw 'sas.raw.data(mem1)' disp=old; |
new |
filename dogcat 'userid.sas8.physn(optwrk)' disp=new space=(trk,(1,3,1)) volume=xxx111 recfm=fb lrecl=255 blksize=6120 dsorg=po; |
|
partitioned extended | existing |
filename mypdse 'sas.test.pdse' disp=old; |
new |
filename tpdse 'sas.test.pdse' dsntype=library space=(trk,(5,2,2)) lrecl=80 blksize=6160 recfm=fb disp=(new, catlg) dsorg=po; |
|
UNIX System Services: HFS files | existing |
filename myhfs '/u/userid/myfile'; |
new |
filename myhfs '/u/userid/myfile'; |
|
temporary | new |
filename nextone '&mytemp' disp=new space=(trk,(3)) lrecl=80 blksize=6160; |
tape | existing |
filename mytape 'prod.data' vol=myvol unit=tape label=(1,SL); |
new |
filename tranfile 'sas.cport.file' label=(1,SL) vol='042627' unit=cart blksize=8000 disp=(new,keep); |
|
concatenated | existing |
filename concat12 ('prod.payroll.data' 'prod.trans(may)'); |
wildcard | existing, in PDS |
filename wild 'prod.payroll(d*)'; |
terminal | n/a |
filename term1 '*'; or filename term2 terminal; |
printer | n/a |
filename prnt unit=printer sysout=a; or filename prnt printer sysout=a; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.