Sample 24564: Obtaining the file creation date of a mainframe file from JFCB
The sample code on the Full Code tab illustrates how to open the Job File Control Block (JFCB) for a system file in a DATA step and access the file's creation date.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
/* JFCB= is a host specific system option. The offset is the location */
/* of the date information in the JFCB. The total length of the JFCB */
/* is 176 characters. */
data _null_;
retain offset 51X;
length JFCB $176;
infile 'os.data.set.name' JFCB=JFCB;
year=input(substr(JFCB,offset,1),IB1.);
day=input(substr(JFCB,offset+1,2),IB2.);
crtdate=datejul((1900+year)*1000+day);
put crtdate= date9. year= day=;
run;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
NOTE: The infile 'name.pds.test' is:
Dsname=NAME.PDS.TEST,
Unit=3390,Volume=TSD004,Disp+SHR,Blksize=6160,
Lrecl=80,Recfm=FB
crtdate=16NOV2004 year=104 day=321
Open the Job File Control Block (JFCB) for a system file in a DATA step and access the file's creation date.
Type: | Sample |
Topic: | SAS Reference ==> DATA Step Common Programming Tasks ==> Utilities
|
Date Modified: | 2007-10-30 14:44:34 |
Date Created: | 2004-09-30 14:08:54 |
Operating System and Release Information
SAS System | Base SAS | z/OS | n/a | n/a |