A new parm, &SQLCNT, was added to the SCANXT and SCANXT2 jcl to control how the scanner counts SELECT, INSERT, DELETE, UPDATE, & LOGIC uses of DB2 columns for the PRG DB2 relationship.
7.2
Repository Webstation Option
SQLCNT=S S = SQL ORIENTED PRG DB2 COUNTSSince the "S" method was the original, the program functionality has been written so that if no parameter is entered the parameter will default to "S". Hence, older JCL without any parameter at all (&SQLCNT is currently the last parameter in the string) should continue to work, as long as the customer is satisfied with the methodology implied by the "S" parameter.
T = TABLE ORIENTED PRG DB2 COUNTS
INSERT INTO SESSION.ACAT_ACCOUNTSBecause the INSERT statement incorporates the whole query every column in the query will be counted as INSERT (the INSERT attribute of the corresponding PRG DB2 relationship between that column and the PROGRAM will be incremented). The columns OFFICE_NO, ACOUNT_NO and ADP_SECURITY_NO of the table MDPOSNTB would be counted in the INSERT tally of the PRG DB2 relationship between themselves and the PROGRAM.
SELECT OFFICE_NO CONCAT ACOUNT_NO
, ADP_SECURITY_NO
FROM MDPOSNTB
WHERE CLIENT_CD = '27'
AND ADP_SECURITY_NO IN ( 'A000849' , '9999315')
(Example I )
SQLCNT = SI have inserted commas between the counts for clarity, but this is approximately what users should expect to see in their SCANCOB.SQL file should they scan in a program which contained only the above query.
Column name sel ins del up log
* 0000,0001,0000,0000,0000
OFFICE_NO 0001,0001,0000,0000,0000
ACOUNT_NO 0001,0001,0000,0000,0000
ADP_SECURITY_NO 0002,0002,0000,0000,0001
CLIENT_CD 0001,0001,0000,0000,0001
&SQLCNT = TNotice that "*" is still counted as INSERTED, but the next three columns are only counted as SELECTED and only once. ADP_SECURITY_NO is also counted as LOGIC (WHERE) and CLIENT_CD is only counted as logic since it does not appear in the SELECT as such.
Column name sel ins del up log
* 0000,0001,0000,0000,0000
OFFICE_NO 0001,0000,0000,0000,0000
ACOUNT_NO 0001,0000,0000,0000,0000
ADP_SECURITY_NO 0001,0000,0000,0000,0001
CLIENT_CD 0000,0000,0000,0000,0001
Column name sel ins del up logWhere * is all columns in SESSIONS.ACAT_ACCOUNTS, which are all DELETEd, and SECURITY_NO is the column from SESSIONS.ACAT_ACCOUNTS which is used to identity the row to be DELETEd. It has been counted as appearing once in a DELETE statement and once in a LOGIC statement as per the old methodology.
* 0000,0000,0001,0000,0000
SECURITY_NO 0000,0000,0000,0000,0001
SELE INSE DELE UPDA LOGIWhere the DELETE count for SECURITY_NO as included in * and the LOGIC count for it as counted separately in the SCANCOB file have been combined into one instance.
------------------------ -------- ------ ---- ----
.ACCOUNT_NO 0 0 1 0 0
.SECURITY_NO 0 0 1 0 1