z/OS ISPF Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


FILESTAT—statistics for a file

z/OS ISPF Services Guide
SC19-3626-00

Use the FILESTAT service to determine statistics about a file on the connected workstation. FILESTAT returns information that the file exists, the longest length record in the file, and the date and time on the file.

Note: Be aware that when the FILESTAT service is issued for certain reserved or restricted operating system file names, your workstation operating system or host system can cease to function, or "hang". See your workstation operating system documentation to note reserved or restricted file names.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--FILESTAT--FILE(var-name)---------------------------->

>--+--------------------------------+--------------------------><
   '-LRECL(var-name),DATE(var-name)-'   

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('FILESTAT'--,var-name------------------------>

>--,-+-var-name,var-name-+-)-----------------------------------><
     '-'b'---------------'     

Parameters

FILE var-name
The variable name containing the workstation file for which you want statistics. If no parameters other than the file name are specified, the function will verify that the file exists with a return code of 0.
LRECL var-name
The variable name in which ISPF returns the longest record length of the file you specify. The variable is returned in character format and has a length of 8.
DATE var-name
The variable name in which ISPF returns the date and time that the specified workstation file was last changed. The date and time are returned in character format, and have a length of 19. The date format is 'yyyy/mm/dd hh:mm:ss'.

Return codes

These return codes are possible:
 0
Workstation file exists.
 4
Workstation file does not exist.
 8
Error in variable specification.
10
No workstation connection exists.
12
Workstation device is not ready.
20
Severe error in FILESTAT service.

Example

This exec verifies the existence of LANGSEL.DES in the D:\DESIGN directory on the workstation. The LRECL of the workstation file is saved in variable LVAR and the date is saved in variable DVAR.

/* REXX */
fivar = 'd:\design\langsel.des'
address ispexec 'filestat file(fivar) lrecl(lvar) date(dvar)'
 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014