Download SELCOPY Manual
Transcript
Operation Words, Parameters and Keywords READ statement READ statement A DB2 results table may be read by coding an SQL SELECT statement on the READ control card. The first time the READ operation is executed, the table is opened and the first row returned to the workarea. For the second and subsequent executions, SELCOPY reads the next row until end of table, at which time the SELECT statement is closed. DB2 statement The DB2 operation executes a general SQL statement. In this case coding SQL= is optional. For any SQL verb, other than SELECT, SELCOPY passes the statement directly to DB2 for execution. For SQL verb SELECT, SELCOPY prepares the statement for execution but does not perform the automatic open and first fetch as for the READ statement. SSA --- DL1, IMS only --- See also: • Section IMS and DL/1 Processing. READ MYDBASE DL1 SSA='SEG00002(FIELD003= XYZ)' GN MYDB DLI SSA=101 The SSA parameter, (Segment Search Argument) is for use on DL1/IMS files only, indicating that for this particular data base operation, activity is to be restricted according to the limitations supplied on the SSA parameter. If the argument is numeric, SELCOPY will assume that the SSA is to be found at that position within the SELCOPY work area, and will pass that SSA to DL1, with minimal validation. If the argument is non-numeric, it is assumed to be a literal SSA. No padding or truncation is done. So ensure your SSA ends with a "close bracket". The SSA supplied for IMS/DL1 must satisfy IMS/DL1 syntax. When the SSA parameter is used, the SEG and SEARCH parameters must be omitted. (This information must be contained in the SSA argument). The SSA may be as complicated as your implementation of DL1 allows, using Command Codes, and multiple Qualification Statements separated by a Boolean Operator. However, multiple SSAs are not supported. SSN=xxxx --- DB2 only --- See also: • Section DB2 Processing. READ DB2 FMT='DEPTNO,DEPTNAME,DEPTMGR' SSN=TEST 'CREATE VIEW FMSUPP AS SELECT * FROM CBL.CONTRACTS \ WHERE LICENCES > 5 WITH CHECK OPTION' TABLE='CBL.DEVELOPMENT' SSN=ADMN SSN= specifies the, up to 4 byte character, DB2 sub-system name to which SELCOPY must be connected to process this statement. If SSN= is omitted, SELCOPY uses the default DB2 subsystem defined in CBLNAME. If you specify more than one value for SSN on different control cards or specify a non-default SSN other than on the first SELCOPY SQL control card SELCOPY will issue ERROR 146 during control card vetting. STACK --- CMS only --- See also: • Issuing STACK commands in section VM/CMS Processing. STACK LIFO 'Data to go on to CMS STACK' THEN STACK FROM 1234 L 80 ELSE STACK FROM 1234 L 80 LIFO Lines may be put on to the console stack dynamically from within a SELCOPY execution with the STACK command. 2015-03-03 11:16:07 SELCOPY Manual 172