Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What is the reason for error SQLCODE = -311 when unloading?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Judy85

New User


Joined: 05 Aug 2011
Posts: 17
Location: China

PostPosted: Wed Sep 21, 2011 7:29 pm    Post subject: What is the reason for error SQLCODE = -311 when unloading?
Reply with quote

What is the reason for SQLCODE = -311 when unloading a table with SQL?
Code:

//SYSTSIN  DD *                                         
  DSN SYSTEM(DB2D)                                       
  RUN  PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL') -   
    LIB('DB2D.RUNLIB.LOAD')                             
//SYSIN    DD *       
    SELECT MACH_TYPE,SERIAL_NBR,CUST_ADDR   
    FROM LIDS.DWCC                         
    WHERE CUST_ADDR LIKE '%DEPT OF ENERGY%'
    OR CUST_ADDR LIKE '%ARMY%'             
    OR CUST_ADDR LIKE '%NAVY%'             
    OR CUST_ADDR LIKE '%AIRFORCE%'         
    OR CUST_ADDR LIKE '%FDIC%'             
    OR CUST_ADDR LIKE '%REPUBLIC BANK%'     
    OR CUST_ADDR LIKE '%DEPT OF DEFENCE%'   
    OR CUST_ADDR LIKE '%FBI%'               
    OR CUST_ADDR LIKE '%IGOV%'             
    OR CUST_ADDR LIKE '%MARINE CORP%'       
    OR CUST_ADDR LIKE '%US MARINES%'       
    OR CUST_ADDR LIKE '%US SENATE%'         
    OR CUST_ADDR LIKE '%US TRUSTEES%'       
    OR CUST_ADDR LIKE '%USDA FSIS%'         
    OR CUST_ADDR LIKE '%USDA-ARS-PDL%'     
    OR CUST_ADDR LIKE '%VIEJAS%'     
    OR CUST_ADDR LIKE '%VION CORP%'         
    OR CUST_ADDR LIKE '%VISTRONIX INC%'     
    OR CUST_ADDR LIKE '%VITRO SVCS DIV%'   
    OR CUST_ADDR LIKE '%WILDWOOD%'   
    OR CUST_ADDR LIKE '%WINCOR NIXDORF%'   
    OR CUST_ADDR LIKE '%WORLD BANK%'       
    OR CUST_ADDR LIKE '%101ST AIRBORNE DIV%'
    OR CUST_ADDR LIKE '%3D RESEARCH CORP%' 
    OR CUST_ADDR LIKE '%53 SPTS/SCN%'       
    OR CUST_ADDR LIKE '%6TH CIRCUIT%';     
/*                                                   
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Sep 21, 2011 7:48 pm    Post subject:
Reply with quote

THE LENGTH OF INPUT HOST VARIABLE NUMBER position-number IS
NEGATIVE OR GREATER THAN THE MAXIMUM
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Sep 21, 2011 7:49 pm    Post subject:
Reply with quote

one of your literals is greater than the length of CUST_ADDR
-311 explained here

and why are you (I assume you are a chinese company) doing looking at databases with US Military info?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 21, 2011 9:38 pm    Post subject: Reply to: What is the reason for error SQLCODE = -311 when u
Reply with quote

Hi DIck,

We (US - DoD) contract anywhere . . . icon_smile.gif

d
Back to top
View user's profile Send private message
Judy85

New User


Joined: 05 Aug 2011
Posts: 17
Location: China

PostPosted: Thu Sep 22, 2011 12:10 pm    Post subject: Reply to: What is the reason for error SQLCODE = -311 when u
Reply with quote

I fact, I am in Us company.
Back to top
View user's profile Send private message
Judy85

New User


Joined: 05 Aug 2011
Posts: 17
Location: China

PostPosted: Thu Sep 22, 2011 12:19 pm    Post subject: Reply to: What is the reason for error SQLCODE = -311 when u
Reply with quote

CUST_ADDR is 120 CHAR

Code:
Select Column Name        Col No Col Type Length Scale  Null Def FP    Col Card
       *                       * *             *      * *    *   *            *
------ ------------------ ------ -------- ------ ------ ---- --- -- -----------
       SERV_PERF              11 CHAR          1      0 Y    N   N           -1
       CUST_ADDR              12 VARCHAR     120      0 Y    N   N           -1
       DLR_CMT                13 CHAR         90      0 Y    N   N           -1
       PART_QTY               14 INTEGER       4      0 Y    N   N           -1
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu Sep 22, 2011 12:47 pm    Post subject:
Reply with quote

Can you post the entire error message?
Back to top
View user's profile Send private message
Judy85

New User


Joined: 05 Aug 2011
Posts: 17
Location: China

PostPosted: Thu Sep 22, 2011 12:54 pm    Post subject: Reply to: What is the reason for error SQLCODE = -311 when u
Reply with quote

I have found the problem. It is because of the problem of the numbers from column 73 to 80 in JCL dataset. I have fix the problem by deleting the numbers. Thank you all!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Sep 22, 2011 8:22 pm    Post subject: Reply to: What is the reason for error SQLCODE = -311 when u
Reply with quote

You're welcome.

Good to hear it is working - thank you for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us