To access CICS® SFS
files from a COBOL application that runs under Linux®, you must follow guidelines for compiling and linking, and for identifying
the file system, the CICS SFS
server, and the SFS files.
Procedure
- Compile and link the COBOL programs in the application
by using the cob2 command.
-
Ensure that the CICS SFS
server that your application will access is running.
-
(Optional) If your application creates one or more SFS files, and you want to allocate the
files on an SFS data volume that has a name other than sfs_SSFS_SERVER, you can specify either or both of the following
names:
- The name of the SFS data volume on which the SFS files are to be created. To do so, assign a
value to the runtime environment variable CICS_SFS_INDEX_VOLUME. The data volume must have been defined to
the SFS server. If you do not know which data volumes are available to the SFS server, issue the
command sfsadmin list lvols.
By default, SFS files are created on the data volume that is named sfs_SSFS_SERVER.
- The name of the SFS data volume on which alternate index files, if any, are to be created. To do
so, assign a value to the runtime environment variable CICS_SFS_INDEX_VOLUME. The data
volume must have been defined to the SFS server.
By default, alternate index files are created on
the same volume as the corresponding base files.
- Identify each SFS file:
- Either set the default file system to SFS by setting
the runtime option
FILESYS
as follows: export COBRTOPT=FILESYS=SFS
Or
alternatively, in an export
command for each SFS
file, precede the file name and SFS server name with the file-system
ID SFS
followed by a hyphen (-
),
as shown below.
- The CICS SFS server name
must precede the file name.
- Any alternate index file names must start with
the base file name, followed by a semicolon (
;
) and
the alternate index name.
For example, if /.:/cics/sfs/sfsServer is the CICS SFS server, and SFS04A
is an SFS file that has alternate index SFS04A1, you could identify
SFS04A by issuing the following export command:
export SFS04AEV="SFS-/.:/cics/sfs/sfsServer/SFS04A(/.:/cics/sfs/sfsServer/SFS04A;SFS04A1)"
Results
For more information about fully qualified names for SFS servers and files, see the related
task about identifying CICS
SFS files.
Example: accessing SFS files