One more example with DSNTEP2 if you want the query output in sysout Thanks, Chandan //SQL EXEC PGM=IKJEFT1A,DYNAMNBR=20 //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(<DB2SUBSYSTEM>) RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) - LIB('DSN710.RUNLIB.LOAD') //SYSPRINT DD SYSOUT=*...
A great effort by you Anuj..Hats off..This forum really encouraging and powerful medium to get to know legends in mainframe and enhance the knowledge.. Great knowledge base for every level programmer starting for beginner to experts..Continue the great work and never hesitate to ask for any assistan...
I doubt SQLERRD(3) will give the count no of rows selected by a cursor before hand. As far as selecting rows concerned, SQLERRD(3) (3) gives the count of rows selected in a multi-fetch/rowset Oriented cursor for a single fetch operation. I don't think there is any field in SQLCA which will give the ...
Nicely put Anuj.. Just addition to IDENTITY columns, you cam mention one more parameter INCREMENT BY. The values advance by the INCREMENT BY value in ascending or descending order for each key. Correct me if I am wrong. As per manual A row ID is a value that uniquely identifies a row in a table. A c...
Hi, I would say to check with basics of COND parameter. Step will be bypassed if any of the conditions becomes true. As per the manual Use the COND parameter to test return codes from previous job steps and determine whether to bypass this job step. You can specify one or more tests on the COND para...
Hi Mohit, I am not sure what you meant by mass delete, is it deleting all rows in one go which satisfy criteria of WHERE clause of DECLARE statement or deleting multiple rows using cursor? If you are using Cursor with rowset positioning you can delete multiple rows with one WHERE CURRENT OF executio...
Hi Rakhee, Please use below query to find unique index of a table SELECT NAME,COLNAME FROM SYSIBM.SYSINDEXES,SYSIBM.SYSKEYS WHERE TBNAME='table name' AND TBCREATOR='creator' AND UNIQUERULE ='U' AND NAME= IXNAME AND IXCREATOR=CREATOR Regards, Chandan
All this I plan to do with just a JCL/DB2 and without writing a cobol program. What do you suggest? I am just wondering how you will do this only with JCL/DB2 and no cobol. You will need to write a program to read file and all other processing? Also for getting different fieldsof the address field ...
COND=(0,LT) will always execute the step on which it is coded as the condition will be always false whereas COND=(0,EQ) will bypass the step if previous steps executed with return code 0.