× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Actually, a couple of things I should've mentioned -- this is on a v5r2 box,
and the file has null-capable fields, hence the NULLindI array. Also the
BATCH file has some fields with alternative names, that is, names longer
than 10 characters.  The syntax is correct according to the manual. The
program has alwnull(*usrctl) on the h-spec. One thing I noticed on the
precompiler listing is that the cross-reference shows both the system field
names (10 characters or less), and the alternative names (more than 10
characters long). I have a feeling this might be the problem, but I haven't
seen anything in the manuals that says which one it will use.

----- Original Message ----- 
From: "Neeraj Sarougi" <neeraj.sarougi@xxxxxxx>
To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, April 12, 2005 11:42 PM
Subject: RE: SQL0312 on UPDATE but not on INSERT


> I Guess your syntax for update is wrong...
>
> c+ Update BATCH
> c+   Set  Field1=  :JrnBATCH ,field2= :NULLindI
> c+   Where rrn(BATCH) = :@JrnRRN
>
> Some thing like that...
>
>
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Dow
> Sent: Wednesday, April 13, 2005 11:57 AM
> To: RPG400-L@xxxxxxxxxxxx
> Subject: SQL0312 on UPDATE but not on INSERT
>
> Hi Everyone,
>
> I have the following code in an SQLRPGLE program:
> ------------------------------------------------------
> d JrnBATCH      e ds                  extname(BATCH)
> d NULLindI        s              5i 0 dim(006)
>
> c                   Select
>
> c                   When      @JrnEntryType='PT'c/exec SQL
> c+ Insert Into BATCH
> c+   Values(:JrnBATCH      :NULLindI)
> c/end-exec
>
> c                   When      @JrnEntryType='DL'
> c/exec SQL
> c+ Delete From BATCH
> c+   Where rrn(BATCH     ) = :@JrnRRN
> c/end-exec
>
> c                   When      @JrnEntryType='UP'
> c/exec SQL
> c+ Update BATCH
> c+   Set  ROW  =  (:JrnBATCH      :NULLindI)
> c+   Where rrn(BATCH    ) = :@JrnRRN
> c/end-exec
>
> c                   EndSl
> ------------------------------------------------------
>
> The fascinating thing is that the INSERT stmt compiles, but not the
> UPDATE.
> The precompiler complains:
>
> SQL0312  30      70  Position 26 Variable JRNBATCH not defined or not
> usable.
>
> Any ideas why?
>
> Peter Dow
> Dow Software Services, Inc.
> 909 793-9050 voice
> 909 793-4480 fax
> 951 522-3214 cell
>
>
>
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 4/12/2005
>
>
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
> list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 4/12/2005
>
>



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.8 - Release Date: 4/13/2005



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.