140 likes | 216 Views
z/OS FNA Revealed and Exposed . Phil Veal Senior Principal Support Engineer Bug Diagnosis and Escalations. Agenda. <Insert Picture Here>. History File name transformation POSIX Syntax Examples. File Name Augmentation. A brief history Available since MPM days (1980’s)
E N D
z/OS FNA Revealed and Exposed Phil Veal Senior Principal Support Engineer Bug Diagnosis and Escalations
Agenda <Insert Picture Here> • History • File name transformation • POSIX • Syntax • Examples
File Name Augmentation • A brief history • Available since MPM days (1980’s) • Pre-dates UNIX System Services and zFS/HFS • Originally used Oracle C runtime library syntax • Since Oracle 9.2.0, uses IBM LE syntax • Backwards compatibility is maintained • ORA$ENV: ORA_RTL_COMPAT=ON (default)
File Name Transformation Oracle utilities use simple file specifications E.g. myquery.sql, myquery.lst The native MVS file system uses datasets E.g. MYGROUP.LIB.SQL(MYQUERY), &&SPOOLOUT Question: How to convert a file name to a dataset name automatically? Answer: ORA$FNA
POSIX(OFF) versus POSIX(ON) • LE runtime parameter • POSIX(ON) • For UNIX System Services environment • LE enclave uses POSIX semantics • POSIX(OFF) • Default for traditional MVS batch and TSO environments • LE enclave uses non-POSIX semantics • Simple file names are interpreted as datasets or files, as appropriate
File Name Syntax • Old MPM syntax - • /DD/name • /DSN/name • OSDI syntax - • //DD:name • //’name’ • //SYSOUT:class • Old syntax still accepted, but not recommended • May be disabled via ORA_RTL_COMPAT (default ON)
FNA Syntax //ORA$FNA DD DSN=…|PATH=… FSA( FTYPE(extension) FNAME(new name) FATTR(attribute string) )
FTYPE • File name type/extension • Logical data type identifier • Defaults defined by Oracle tools • Usually 3 characters • Examples – • .sql, .plb, .lst, .ctl, .log, .dmp • Can be user defined
FNAME • New transformed file name • Original file specification may be included using “+” • Example 1: FNAME(‘MYLIB.SQL(+)’) • stuff.sql -> MYLIB.SQL(STUFF) • Example 2: FNAME(‘MYGROUP.+’) • stuff.sql -> MYGROUP.STUFF.SQL • PROFILE PREFIX (TSO) or USERID (batch) may be included using “*” • E.g. FNAME(“//’*.LIB.SQL(+)’”)
Examples FSA( FTYPE(SQL) FNAME(‘LIB(+)’) ) LIB.SQL(STUFF) stuff.sql FSA( FTYPE(SQL) FNAME(‘//DD:SQL(+)’) ) //DD:SQL(STUFF) stuff.sql FSA( FTYPE(LST) FNAME('//SYSOUT:X') ) //SYSOUT:X SPOOL report
FATTR • File attribute assignment • Output only • Must begin with a semicolon • Keywords – • RECFM=V(B)|F(B) etc. • LRECL=record length • BLKSIZE=block size • SPACE=(units,(primary,secondary,directory blocks)) • Example - • FATTR(';space=(trk,(2,1)),recfm=VBA,lrecl=137,blksize=0')
<Insert Picture Here> https://metalink.oracle.com/ Forums: IBM z/OS Platform Phil.Veal@oracle.com