Download SELCOPYi Reference and User Guide
Transcript
File Search/Update/Copy/Remap Output Report Unformatted File Search/Update/Copy Unformatted file search, update or copy is the most commonly used form of the utility, acting on text data files containing unformatted records. By definition, Unformatted File Search/Update/Copy operates on records without application of a structure (SDO) or COBOL/PL1 copybook to format record data. i.e. each record is treated as a single character string. In general, Unformatted File Search/Update/Copy processing proceeds as follows: 1. Sequentially read a record from a file matching an INPUT fileid mask. 2. Check that the record falls within the range of records to be selected for processing as specified by STARTREC/STARTKEY/STARTRBA and FOR syntax. (Note that a direct read will have been performed for VSAM KSDS, ESDS or RRDS.) 3. Apply any search criteria on the record as specified by a WHERE expression. 4. Apply any search criteria on the record as specified by one or more FIND operations. 5. Apply any data changes on the record as specified by one or more CHANGE operations. 6. If no OUTPUT fileid is specified and the record data has been changed by a CHANGE operation, then update (replace) the original input file record with the changed record. 7. If an OUTPUT fileid is specified, then copy the record to this file regardless of whether record data satisfies search criteria or has been changed. Processing of the current record stops and continues with the next input record if no OUTPUT fileid is specified (for copy) and the record's data does not satisfy specified search criteria or if the record is not within the range of records selected for processing. Note that search and data change functionality is based on the structured data edit (SDE) FIND, WHERE and CHANGE commands which operate on individual formatted data fields. For unformatted records, the record data occupies a single data field of data type CHAR and length equal to the file's maximum record length. This field has field reference number #1 and field name "Record", either of which may be used as a parameter to WHERE, FIND and/or CHANGE. Unformatted File Search Unformatted file search uses WHERE and/or FIND operations to specify search criteria and so select then report only those records that satisfy all of the search criteria. If both WHERE and FIND criteria are specified, then a record will first have to satisfy the the WHERE expression before the FIND criteria is checked. Unformatted File Update Unformatted file update uses CHANGE operations to change one or more occurrences of a character search string to the specified character replace string. The changed record is then written back to the input file replacing the original record read. Since an update-in-place is performed, the length of the updated record cannot be changed. Any CHANGE operation that results in a change to the record length will flag an error against that record in the output report. File update should not be actioned without first performing a test run (FSU parameter NOUPDATE) where no records are actually updated but an file update output report is still generated. This allows the user to correct or accept any CHANGE errors before re-running the utility to update the records. File update will open data sets for update-in-place processing instead of simply for input. An exclusive ENQ will be set when the data set is opened, and reset when it is closed. Optional file search criteria, as specified for Unformatted File Search, may be used to filter input records before any CHANGE operation is performed. If no search criteria is specified then CHANGE operations will apply to all input records. Unformatted File Copy Unformatted file copy copies all records within the range of records selected for processing, from all selected input files to a single output file. If the output file is a PDS/PDSE library then only input library members will be copied, potentially replacing existing members of the same name in the output library. Optional change operations, as specified for Unformatted File Update, may be used to change record data as it is being copied. Records are copied regardless of whether or not they satify supplied search criteria or have been changed by a CHANGE operation. 2013-11-13 13:06:41 SELCOPY/i Reference and User Guide 98
Related documents
SELCOPY/i Reference and User Guide
CBL Interactive (CBLi)
SELCOPY Manual
sevenstaxSOAP/XML/HTTP User Manual
SELCOPYi Training Manual
SELCOPY C++ Version (SLC) 3.10 New Features
Appendix 8 of the NDSR User Manual
Structured Data Environment Manual
Model 6400EH - Teledyne Analytical Instruments
Hierarchical nominal terms and their theory of rewriting
CBLVCAT Manual
Structured Data Environment (SDE)