Figure 1 shows simplified z/VSE® JCL for searching a non-VSAM-managed
sequential file. This example is supplied with SuperC in the Librarian
member ASMFVSS1.Z.
Before running this example, edit the lines highlighted by numbers
(such as 1 ) as described in the instructions
following the example listing. Figure 1. Sample z/VSE JCL
for searching a non-VSAM-managed sequential file
// JOB ASMFVSS1
// LIBDEF *,SEARCH=(PRD2.PROD)
// OPTION NODUMP
/*
/* Define file to be searched
/*
// DLBL search_file_name,'search_file_ID',0,SD ┐
// EXTENT extent_information ├─ 1
// ASSGN assign_logical_unit_information ┘
/*
/* Note: The listing file is output to SYSLST.
/* (If the WIDE process option is used, SYSLST must be
/* assigned to a printer capable of handling lines of
/* at least 202 characters.)
/*
/* Run the search with these options…
/*
// EXEC ASMFSUPC,PARM='SRCHCMP process_options' 2
*
* …and these process statements
*
NEWDD search_file_name,attributes 3
SRCHFOR 'search_string' 4
⋮
other_process_statements 5
⋮
/*
/&
1
Replace search_file_name with your choice
of DLBL name for the file to be searched; also insert this DLBL name
in the NEWDD process statement (see 3 ).
Replace search_file_ID with the name of
the file to be searched. Insert appropriate extent information and
assign logical unit information.
2
Replace process_options with any process
options you want to use to customize how SuperC performs the search
or formats the listing.
For a description of each process option,
see Process options.
For example:
PARM='SRCHCMP DPCBCMT COBOL'
instructs SuperC
to perform a search:
Ignoring COBOL comment lines. (Process option DPCBCMT ignores
lines with an * in column 7.)
Ignoring columns 1 to 6. (Process option COBOL ignores columns
1 to 6 which are assumed to be sequence numbers.)
SuperC outputs the listing
file to SYSLST. For a selection of sample listing files, see Understanding the listings.
3
NEWDD is a process statement that allows you to:
Use your own choice of DLBL name for the file to be searched.
If you do not specify a NEWDD process statement, you must use the
DLBL name NEWDD.
Specify file attributes for the file to be searched. If you do
not specify a NEWDD process statement with file attributes, SuperC
assumes that the (non-VSAM) file to be searched contains fixed-length
unblocked records with a record size and block size of 80.
Replace search_string with a string
that you want to search for. For information about specifying search
strings, see Search strings in the input file.
5
Insert any other process statements (one per line) that you want
to use.
For example, the following process statement:
DPLINE 'ignore this line'
instructs
SuperC to exclude from the search any lines containing the specified
string (ignore this line).