Topic
  • 4 replies
  • Latest Post - ‏2013-11-25T22:28:50Z by scott_klement
Silly_T
Silly_T
2 Posts

Pinned topic SQLRPGLE Block Insert using array DS - need help ASAP please

‏2012-03-24T13:13:54Z |
i am at V5R4; the following excerpt fails to compile rendering :

SQL0312 30 728 Position 31 Variable WWCURSOR_01_RECORDCOUNT not defined
SQL5011 30 729 Position 36 Host structure array WWCHHPADT1PDS not defined or not usable.

needless to say it will compile until i atempt to install the insert statement. what am i missing? in this same program i have a block fetch working perfectly (from a different table) why won't this work? any/all assistance is greatly appreciated.

d wwCursor_01_RecordCount...
d like ( sqler3 )

//______________________________________________________________________
//
d wwChhpadt1pDS...
d e ds
d extname ( chhpadt1p )
d qualified
d dim( 500 )

exec sql
insert into chhpadt1p
:wwCursor_01_RecordCount rows
values(:wwChhpadt1pDS
);
Updated on 2012-04-02T17:24:08Z at 2012-04-02T17:24:08Z by scott_klement
  • Silly_T
    Silly_T
    2 Posts

    Re: SQLRPGLE Block Insert using array DS - need help ASAP please

    ‏2012-03-24T21:06:36Z  
    ding! got it...
  • scott_klement
    scott_klement
    245 Posts

    Re: SQLRPGLE Block Insert using array DS - need help ASAP please

    ‏2012-04-02T17:24:08Z  
    Perhaps you missed the "S" (for standalone) on the definition of wwCursor_01_RecordCount? Aside from that, your code looks okay to me. (But, I didn't try it.)

    If you've already found the solution, can you post it? Thanks!
  • jcong
    jcong
    1 Post

    Re: SQLRPGLE Block Insert using array DS - need help ASAP please

    ‏2013-11-21T03:34:38Z  
    Perhaps you missed the "S" (for standalone) on the definition of wwCursor_01_RecordCount? Aside from that, your code looks okay to me. (But, I didn't try it.)

    If you've already found the solution, can you post it? Thanks!

    Did we ever get an answer from IBM? SQL5011 is the bane of my existence, without even involving dates.

     

  • scott_klement
    scott_klement
    245 Posts

    Re: SQLRPGLE Block Insert using array DS - need help ASAP please

    ‏2013-11-25T22:28:50Z  
    • jcong
    • ‏2013-11-21T03:34:38Z

    Did we ever get an answer from IBM? SQL5011 is the bane of my existence, without even involving dates.

     

    To the best of my knowledge, nobody from IBM responded to this thread, but that might be because the OP said the problem was solved, so they didn't feel the need.

    There are many reasons for SQL5011.  The reason you're having in your program might be completely different from the reason that Silly_T was having in this discussion thread.

    In fact, that's my gripe with SQL5011!: it's too vague!   I would like it to tell me why it decided something was unusable so I knew what was going on, and could adapt my code accordingly.  But, instead I have to try things at random until one of them works.