Error In Dsntiaul Sql Input
Contents |
by phpBB © 2001, 2005 phpBB Group
all rows from up to 100 DB2 tables. With DSNTIAUL, you can unload data of any DB2 built-in data type or distinct type. You can unload up to 32 KB of http://adibala.blogspot.com/2008/07/dsntiaul-db2-unload-program.html data from a LOB column. DSNTIAUL unloads the rows in a form that is http://www.dbforums.com/showthread.php?1674261-DB2-Unload-using-DSNTIAUL compatible with the LOAD utility and generates utility control statements for LOAD. DSNTIAUL also lets you execute any SQL non-SELECT statement that can be executed dynamicallyDSNTIAUL parameters:SQL : Specify SQL to indicate that your input data set contains one or more complete SQL statements, each of which ends with a semicolon. You can include any SQL statement error in that can be executed dynamically in your input data set. In addition, you can include the static SQL statements CONNECT, SET CONNECTION, or RELEASE. DSNTIAUL uses the SELECT statements to determine which tables to unload and dynamically executes all other statements except CONNECT, SET CONNECTION, and RELEASE. DSNTIAUL executes CONNECT, SET CONNECTION, and RELEASE statically to connect to remote locations.number of rows per fetchSpecify a number from 1 to 32767 to error in dsntiaul specify the number of rows per fetch that DSNTIAUL retrieves. If you do not specify this number, DSNTIAUL retrieves 100 rows per fetch. This parameter can be specified with the SQL parameter. #Specify 1 to retrieve data from a remote site when DSNTIAUL #is bound with the DBPROTOCOL(PRIVATE) option.#TOLWARN#Specify NO (the default) or YES to indicate whether DSNTIAUL continues #to retrieve rows after receiving an SQL warning: ##NO #If a warning occurs when DSNTIAUL executes an OPEN or FETCH to retrieve #rows, DSNTIAUL stops retrieving rows. If the SQLWARN1, SQLWARN2, SQLWARN6, #or SQLWARN7 flag is set when DSNTIAUL executes a FETCH to retrieve rows, DSNTIAUL #continues to retrieve rows. # Exception:# # YES #If a warning occurs when DSNTIAUL executes an OPEN or FETCH to retrieve #rows, DSNTIAUL continues to retrieve rows. # #If you do not specify the SQL parameter, your input data set must contain one or more single-line statements (without a semicolon) that use the following syntax: table or view name [WHERE conditions] [ORDER BY columns]Each input statement must be a valid SQL SELECT statement with the clause SELECT * FROM omitted and with no ending semicolon. DSNTIAUL generates a SELECT statement for each input statement by appending your input line to SELECT * FROM, then uses the resul
check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: DB2 Unload using DSNTIAUL Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 01-30-12,11:16 #1 dontbehasty View Profile View Forum Posts Registered User Join Date Jan 2012 Posts 2 Unanswered: DB2 Unload using DSNTIAUL Hi Im trying to use the following code to unload some data from 3 tables. //DBUNLOAD EXEC PGM=IKJEFT01 //SYSTSPRT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSREC00 DD DSN=JD1234.UNLOAD, // DISP=(NEW,CATLG,CATLG),SPACE=(CYL,(5,5),RLSE) //SYSPUNCH DD DSN=JD1234.SYSPUNCH, // DISP=(NEW,CATLG,CATLG),SPACE=(CYL,(1,1),RLSE) //SYSTSIN DD * DSN SYSTEM(DB2A) RETRY(3) RUN PROGRAM(DSNTIAUL) PARMS('SQL') END However the code keeps abending and i get the following error: DSNT490I SAMPLE DATA UNLOAD PROGRAM DSNT505I DSNTIAUL OPTIONS USED: SQL DSNT503I UNLOAD DATA SET SYSPUNCH RECORD LENGTH SET TO 80 DSNT504I UNLOAD DATA SET SYSPUNCH BLOCK SIZE SET TO 27920 DSNT506I INPUT STATEMENT WAS NOT A FULL SELECT ON A SINGLE TABLE. LOAD STATEMENT WILL NEED MODIFICATION. DSNT503I UNLOAD DATA SET SYSREC00 RECORD LENGTH SET TO 4076 DSNT504I UNLOAD DATA SET SYSREC00 BLOCK SIZE SET TO 24456 Despite getting this error, some data is being loaded into JD1234.UNLOAD, however this is only 100 lines. when i try to update PARMS('SQL') to PARMS('SQL,500'), it abends with a S322 error. Would anyone be able to help me out. Many thanks Reply With Quote 01-30-12,11:27 #2 Marcus_A View Profile View Forum Posts Registered User Join Date May 2003 Location USA Posts 5,737 Where is your SQL statement? //SYSIN DD * SELECT * FROM DSN8810.PROJ; SELECT * FROM DSN8810.EMP WHERE WORKDEPT LIKE 'D%' ORDER BY EMPNO; M. A. Feldman IBM Certified DBA on DB2 for Linux, UNIX, and Windows IBM Certified DBA on DB2 for z/OS and OS/390 Reply With Quote 01-30-12,11:38 #3 dontbehasty View Profile View Forum Posts Registered User Join Date Jan 2012 Posts 2 Didn't think you's would have needed to see it but here it is: //SYSIN DD * SELECT ABC_COL1, ABC_COL2, ABC_COL3 ,DEF_COL1, DEF_COL2, GHI_COL1 FROM TABLE1 ,TABLE2 ,TABLE3 WHERE ABC_COL1 = DEF_COL1 AND ABC_COL1 = GHI_COL1 WITH UR; Many thanks Reply With Quote 01-30-12,16:07 #4 Stealth_DBA View Profile View Forum Posts Re