f



The meaning of sqlcode value 326

Hello group,

    I start using sql statements in RPG programs in order to retrieve
records from phisical files.

    When I wrote If  the statement "sqlcod doune 0" as is witten IBM
examples,
I didn't receive any records. After debugging the program, I've found,
that the value of the sqlcode after each row retrieval is 326. Of
course after changing the sttement to "sqlcod doune 326" I've got
records.

   Does the value 326 of sqlcode mean proper record retrieval?

   Besides of that,  which sqlcode values mean  EOF, error?
  As  is known in RPG, in simple read,  the programmer can identify
EOF, error by
  examining the indicators' values

Thank you in advance,
Amos



 as I can identify them by using simple
0
am12348 (14)
6/18/2008 6:40:41 PM
comp.sys.ibm.as400.misc 9219 articles. 3 followers. Post Follow

3 Replies
2746 Views

Similar Articles

[PageSpeed] 34

Check this page: 
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzala/rzalafinder.htm

You will also have had an SQL0326 message in your job log that you can 
prompt with F1.

And you will also find SQL0326 in the QSQLMSG message file.

As you have discovered, "sqlcod doune 0" sometimes stops before the end of 
the data.  Here's another link you could look at:
http://www.mcpressonline.com/tips-techniques/sql/techtip-sqlcod-end-of-file-gotcha.html


Sam

"AMOS" <am12348@walla.com> wrote in message 
news:0d6b9268-fee6-4f5e-b47e-2edfc4e23e9c@p25g2000hsf.googlegroups.com...
> Hello group,
>
>    I start using sql statements in RPG programs in order to retrieve
> records from phisical files.
>
>    When I wrote If  the statement "sqlcod doune 0" as is witten IBM
> examples,
> I didn't receive any records. After debugging the program, I've found,
> that the value of the sqlcode after each row retrieval is 326. Of
> course after changing the sttement to "sqlcod doune 326" I've got
> records.
>
>   Does the value 326 of sqlcode mean proper record retrieval?
>
>   Besides of that,  which sqlcode values mean  EOF, error?
>  As  is known in RPG, in simple read,  the programmer can identify
> EOF, error by
>  examining the indicators' values
>
> Thank you in advance,
> Amos
>
>
>
> as I can identify them by using simple 


0
none9415 (338)
6/19/2008 2:01:49 AM
On Jun 18, 8:40=A0pm, AMOS <am12...@walla.com> wrote:
> Hello group,
>
> =A0 =A0 I start using sql statements in RPG programs in order to retrieve
> records from phisical files.
>
> =A0 =A0 When I wrote If =A0the statement "sqlcod doune 0" as is witten IB=
M
> examples,
> I didn't receive any records. After debugging the program, I've found,
> that the value of the sqlcode after each row retrieval is 326. Of
> course after changing the sttement to "sqlcod doune 326" I've got
> records.
>
> =A0 =A0Does the value 326 of sqlcode mean proper record retrieval?
>
> =A0 =A0Besides of that, =A0which sqlcode values mean =A0EOF, error?
> =A0 As =A0is known in RPG, in simple read, =A0the programmer can identify
> EOF, error by
> =A0 examining the indicators' values
>
> Thank you in advance,
> Amos
>
> =A0as I can identify them by using simple

Hi,

In either way I'd avoid to use the SQLCOD in the DOU or DOW statement,
because SQLCOD is set by each executed SQL statement. In this way the
loop may be left or an endless loop will be generated because SQLCOD
gets overwritten by an other SQL statement.

I'd check SQLCOD immediately after the execution.
Example:
    If SQLCOD =3D 100; //Not Found
     Leave;
    ElseIf SQLCOD < *Zeros;
    //Error
    EndIf;

Birgitta
0
Hauser5802 (98)
6/19/2008 5:45:25 AM
SQLCODE 326 is returned when the structure parameter passing technique
is used and the number of host variables specified is *greater* than
the number of columns in the select list.

On Jun 18, 2:40=A0pm, AMOS <am12...@walla.com> wrote:
> Hello group,
>
> =A0 =A0 I start using sql statements in RPG programs in order to retrieve
> records from phisical files.
>
> =A0 =A0 When I wrote If =A0the statement "sqlcod doune 0" as is witten IB=
M
> examples,
> I didn't receive any records. After debugging the program, I've found,
> that the value of the sqlcode after each row retrieval is 326. Of
> course after changing the sttement to "sqlcod doune 326" I've got
> records.
>
> =A0 =A0Does the value 326 of sqlcode mean proper record retrieval?
>
> =A0 =A0Besides of that, =A0which sqlcode values mean =A0EOF, error?
> =A0 As =A0is known in RPG, in simple read, =A0the programmer can identify
> EOF, error by
> =A0 examining the indicators' values
>
> Thank you in advance,
> Amos
>
> =A0as I can identify them by using simple

0
jflaker (194)
6/23/2008 3:12:05 PM
Reply:

Similar Artilces:

Printing on AS400 via IBM AS400 Java Toolkit
Hello all, I'm working on a program that needs to send a print job to a printer connected to an AS/400. I've tried using the SpooledFileOutputStream and I've also tried using one of the SCS Writer classes. Neither solution is working. With the SpooledFileOutputStream I am at least able to create my print file, but when my program ends, the file is still not being printed. This program does not run on the AS400, it runs on a PC and connects to the AS400 via the toolkit classes. I know this part works as I am able to use the toolkit to access Data Queues, Files and Data Areas without a problem. Is there anyplace anyone can point me to see some examples of how to print a file using the AS400 Java Toolkit? Thanks in advance, Chuck Chuck, What printer data stream is used? or how was the printer data generated? I am wondering if the data stream being generated matches the data stream of the printer connected to the iSeries? What printer is attached to the iSeries and how is it configured? The iSeries info center has some Toolbox examples: Programming>Java>IBM Toolbox for Java>IBM Toolbox for Java Classes> Access Classes>Print>Creating... Dave Chuck wrote: > Hello all, > > I'm working on a program that needs to send a print job to a printer > connected to an AS/400. I've tried using the SpooledFileOutputStream > and I've also tried using one of the SCS Writer classes. Neither > solution is working. With the Sp...

IBM value $234.5bn = Microshaft value $234.5bn
IBM value $234.5bn = Microshaft value $235.5bn ---------------------------------------------- BWHAHAHAHAHAHAHAHAHAHHAHHAHAHAHAHAHAHAHAHAHAAA!!!! After all these years of screwing customers, screwing governments, screwing US diplomats, screwing PCs, screwing PC makers, screwing software competitors, screwing open source, screwing the public with internet trolls, the now deflated microshaft is fscked royally from behind by IBM. All that screwing around for what? They accomplished nothing. Linux still beat them. IBM, a Linux company, is going to tower over microshaft again because Linux is far more capable than microshaft and their two bit MBA (non techie) management can ever hope to become. Also, IBM was actually ahead nearing closing time, but some illegal trade(r) bought millions of dollars worth of micorshaft shares illegally to inflate microshaft share price 2 minutes from closing time adding at least half a billion dollars in net worth to microshaft share value just to keep up with IBM share value which had up until that point exceeded micorshaft share valuation. It demands a SEC investigation. But the SEC is powerless against big money as usual. On 3/8/2013 4:38 PM, 7 wrote: > IBM value $234.5bn = Microshaft value $235.5bn > ---------------------------------------------- > > > BWHAHAHAHAHAHAHAHAHAHHAHHAHAHAHAHAHAHAHAHAHAAA!!!! > > > After all these years of screwing customers, > screw...

IBM AS400
Does anyone have some notes, documentation or helful pointers about navigating, command language and DB2 on an AS400 for a guy who has done HP3000, Windows 2k/2k3, MS SQL, HP9000, IBM ES9000/UNIX, SCO UNIX? Ideally a commands cross reference qaulivalent would be terrific - I.E. HP3000 to AS400. Thanks much. P.S. I'm taking a role in a shop that runs its ERP system on this platform. Jim. ____________________________________________________________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.y...

mean value
I have some tables that they have the same constructure.I want to know how could I use the"proc means~~~~" program so as to get their mean value. i,e: I want to get the mwan value of these overlaped tables ..please help me,Thank you. Ljmpll, Good to show a sample data and the desired output to get someone help you. Muthia Kachirayan On 5/24/06, ljmpll@sohu.com <ljmpll@sohu.com> wrote: > > I have some tables that they have the same constructure.I want to know > how could I use the"proc means~~~~" program so as to get their mean > value. i,e: I want to...

mean value
i have 2568256 image. i had converted to 4*4 blocks and also converted into 16*1 linear arrays. i need coding to calculate mean value of 1 to 8 rows, then 9 to 16.. like this. please send suitable coding.. i am using code like below. "divya pandiaraj" wrote in message <n9cqof$lud$1@newscl01ah.mathworks.com>... > i have 2568256 image. i had converted to 4*4 blocks and also converted into 16*1 linear arrays. i need coding to calculate mean value of 1 to 8 rows, then 9 to 16.. like this. please send suitable coding.. i am using code like below. How are the rows 1 to 8, an...

counting events for certain intervall then write value to file alternatively calculate mean value events/minute
Hello! &nbsp; I want to continously count the number of events for a certain&nbsp;time intervall &nbsp;(eg. every &nbsp;5 minutes) and at the end of this time write the amount to a text file. &nbsp; Can anyone tell me how to do this? Writing to text file is not a problem, but how do I count the events&nbsp;occuring in a&nbsp;certain time intervall? &nbsp; I already tried a while loop with an integrated case structure linked with a shift register and an incrementation always when a event is happening. But how can I reset the value of the counter after time has passed? &nbsp; is this the right approach or do I have to use something different? &nbsp; if what i want to do is not possible, is there a possibility to calculate a mean value - (events/minute) an write this value every x minutes to a file? &nbsp; Thanks a lot in advance !!! &nbsp; tomsee In you original code, when the time has elapsed and your case structure code happens, put a fresh timer in the True case and wire it out to a shift register. &nbsp; <img src="http://forums.ni.com/attachments/ni/170/329546/1/eventcounter3.png"> &nbsp;Message Edited by StevenD on 06-06-2008 09:09 AM eventcounter3.png: http://forums.ni.com/attachments/ni/170/329546/1/eventcounter3.png Hello Steven, Thanks a lot for your inspiration, logging my data&nbsp;with&nbsp;a selectable time intervall isn�t a&nbsp;problem any more! Greets, Thomas ...

Value if _page_ value into another value??
I am trying to get my Mtitle and Footer with in the dataset Instead of getting them as title and Footnotes the reason My boss requested (there is Other reason ) For that I am doing something like this My Problem is trying to get Titles in the Dataset, When I trying something like this The second title is Over writing the First one. But I need my Report some thing like this . Is there is something similar to *compute before _page_ or can I have value of _page_ into some other value.* MYPHARMA Page 1 of 3 . PEN 20007 Table 14.1.4 Demographic Characteristics Modified Intent-To-Treat Subjects /* CREATE REPORT */ ods rtf file = "&dir1.T14_1_2_MXXX_1303.RTF" style=autoexec; title "" ; Footnote"" ; proc report data= &Program. nowd missing split='?' style(header)=[protectspecialchars=off]; columns ("&border" (page _userFoot _PageNo _lastLine Sec Row Col0 Col2_1 Col2_1 Col2_2 Col2_3 Col2_4 )); define _userFoot / order Noprint ; define _PageNo / order Noprint ; define _lastLine / order Noprint ; define page/ order order=internal noprint; define Sec/ order noprint; define Row/ order noprint; define Col0 / display "Variable" style=[cellwidth=2.1in] style(header)=[just=left]; define Col2_1 /display "Placebo?(N=%cmpres(&all_plac.))&quo...

mean value by integration
Could someone please help me with the following integration . I need to solve the following where x' is the mean value x'=integral(x*y(x).dx)/integral(y(x).dx) where y=[6.2770 10.5137 14.8385 19.2196 21.5972 19.6632 15.2690 10.9238 6.5569] x=[ 2.6097 2.6158 2.6259 2.6314 2.6501 2.6615 2.6633 2.6654 2.6659] Ie. without having to use the function y(x). How can I solve for x' using the above data? My understanding is that the numerator is essentially: sum[x*y(x)] for the given values of x and y (ie a weighted form ). therefore I have numerator=x.*y; the bottom is the inte...

Mean Intensiity Value
Hi all, Im currently working on watershed segmentation. Anyone can help me on how to find mean intensity value of each waterhsed region? Thanking in advance ...

How to calculate the Mean value?
I've written the following code to calculate the Mean Values of x, y & z. *************************************************************** for i=2:size(A) % A = column of input data x(i) = % formula y(i) = % formula z(i) = % formula end Mean_x=mean(x); % mean of all the values of x Mean_y=mean(y); % mean of all the values of y Mean_z=mean(z); % mean of all the values of z *************************************************************** With this code, the mean value is calculated for i=1:size(A) taking x(1), y(1) & z(1) as 0. I need to calculate the mean for i=2:size(A), excludi...

Calculating mean value
Dear all, I am beginner in using Matlab, but my first question may be very basic to all of you. I have Ascii file on a weekly data. For example 2002 year data it goes files like mod1.asc, mod9.asc, mod17.asc, mod25.asc...and upto mod361.asc Question: Like wise i have data for 8 years. Now i would like to calculate for the first three files on the monthly mean value between 2002 to 2009 and get an output. Please help me if some one knows. Thanks, Giriraj "Amarnath " <agiriraj@icimod.org> wrote in message <hocc27$nci$1@fred.mathworks.com>... > Dear all,...

Calculation of mean values
We want to calculate the mean values of each clock cycle of a current trace. The trace is available in a two column vector where the first value is the time and the second value is the current. The problem is that the t-values are not equidistant and threre exist only current values when they are unequal zero. The clock period is fix. Calculation of the mean value of the complete trace is not difficult but is there a Matlab function where I can input the clock period and get a vector of all mean values of each clock cycle? Thank you Martin Feldhofer I suggest to use interp1 to get equ...

computing mean value
i have some data of the form (my true data are much more) x y c 1 2 0.6 1 2 1 1 2 0.8 1 3 0.8 1 3 2.3 1 3 1.4 2 5 1.2 2 5 0.7 2 5 0.9 2 8 3.6 2 8 0.3 2 8 0.6 3 3 0.9 3 3 0.4 3 3 0.4 3 9 0.4 3 9 0.9 3 9 0.7 and i need to write a code to calculate the mean value of c for each (x,y). if anyone has any idea please help me. thanks so much! sbiri wrote: > > > i have some data of the form (my true data are much more) > x y c > 1 2 0.6 > 1 2 1 > 1 2 0.8 > 1 3 0.8 > 1 3 2.3 > 1 3 1.4 > 2 5 1.2 > 2 5 0.7 > 2 5 0.9 > 2...

IBM... the true meaning
Was wondering if anybody has any good expansions of IBM... if you've been working with their horrible J2EE containers/development environments and been as frustrated as I am with them you might have thought of a few. Here's some I've come up with International Bloated Mechanisms Ignore Bitter Multitudes Irritating Bowel Movements Hoss Spence <hossspence@hotmail.com> scribbled the following: > Was wondering if anybody has any good expansions of IBM... if you've > been working with their horrible J2EE containers/development > environments and been as frustrated...

Re: mean value
Ljmpll, Good to show a sample data and the desired output to get someone help you. Muthia Kachirayan On 5/24/06, ljmpll@sohu.com <ljmpll@sohu.com> wrote: > > I have some tables that they have the same constructure.I want to know > how could I use the"proc means~~~~" program so as to get their mean > value. i,e: I want to get the mwan value of these overlaped tables > .please help me,Thank you. > ...

Meaning of output value?
Hello everybody, For a school project I use the Xilinx Coregen FFT core. It does work, but what does the output mean? Is the Real output the amplitude and the Imaginary output the phase? If anyone knows, please HELP!!! thanks, Sander Odekerken Hi Sander, http://www.dspguru.com/info/tutor/quadsig.htm Cheers, Syms. This is an extremely basic question about complex math. Real and Imaginary number pairs make up a cartesian coordinate pair. Think of the real part as the x-axis and the imaginary part as the y-axis. Amplitude and phase values produce a polar coordinate location. Th...

What does variable value mean?
var xcNode = []; if you can't tell, those are [ and ]. This is from the expanding menu found at: http://inspire.server101.com/js/xc/ Trying to use the script but keep running into a snag. I get an error stemming from a body onload issue. <BODY onload="xcSet('x', 'xc', 'js');"> This I do not understand at all. Clues appreciated. Means : var xcNode = new Array(); BMR Richard a �crit : > var xcNode = []; > > if you can't tell, those are [ and ]. > > This is from the expanding menu found at: > http://inspire.server10...

What does it mean to SET a value?
What does it mean to set a value or April fools all year long :) http://beyondsql.blogspot.com/2008/03/sql-what-does-it-mean-to-set-value.html steve wrote: > What does it mean to set a value or April fools all year long :) > > http://beyondsql.blogspot.com/2008/03/sql-what-does-it-mean-to-set-value.html The relevant portion of this article appears to be the following: > In Sql when there are multiple rows that satisfy a > a WHERE clause the variable is left undefined and an error generated: > > DECLARE @MyFrt MONEY; > SET @MyFrt = (SELECT Freight FROM Orders WHERE OrderID<=10249); > -- Subquery returned more than 1 value. This is not permitted when the subquery follows > -- =, !=, <, <= , >, >= or when the subquery is used as an expression. > > This is really a valid logical operation, an attempt to set (assign) a table to a variable. > This is precisely what D4 does: > > var MyFrt:=Orders where OrderID<=10249 {Freight}; > > select MyFrt; > > Freight //A table. > ------- > $11.61 > $32.38 > > select MyFrt is table{Freight:Money};//Returns True confirming MyFrt is a table type. But why not simply use a temporary table? select Freight into #MyFrtTable from Orders where OrderID <= 10249 Your previous line of argument (explicit table-valued procedure parameters, replacing implicit temp-table input/output and/or SELECT/FROM-based output) was more compelling; my objection to ...

Re: Value if _page_ value into another value??
On Mon, 3 Dec 2007 23:25:03 -0500, SAS_learner <proccontents@GMAIL.COM> wrote: >I am trying to get my Mtitle and Footer with in the dataset Instead of >getting them as title and Footnotes the reason My boss requested (there is >Other reason ) For that I am doing something like this > >My Problem is trying to get Titles in the Dataset, When I trying something >like this The second title is Over writing the First one. But I need my >Report some thing like this . Is there is something similar to *compute >before _page_ or can I have value of _page_ into some other value.* > >MYPHARMA >Page 1 of 3 . >PEN 20007 > > > Table 14.1.4 > Demographic >Characteristics > Modified Intent-To-Treat >Subjects > >/* CREATE REPORT */ >ods rtf file = "&dir1.T14_1_2_MXXX_1303.RTF" style=autoexec; >title "" ; >Footnote"" ; >proc report data= &Program. nowd missing split='?' >style(header)=[protectspecialchars=off]; > columns ("&border" (page _userFoot _PageNo _lastLine Sec Row Col0 Col2_1 >Col2_1 Col2_2 Col2_3 Col2_4 )); > define _userFoot / order Noprint ; > define _PageNo / order Noprint ; > define _lastLine / order Noprint ; > define page/ order order=internal noprint; > d...

Exclusion of values in mean calculation
Hello... I have a problem with mean calculation.&nbsp; I need to create a VI that by means of a Boolean (true or false) I can choose which value will be used for mean calculation. I used the Select function to do this but when I push the button to say "Don't use this number in mean calculation", the Select function does not allow that the number go to the Mean function but the Select funcion sends a Zero. The result of is that the mean value is wrong, because the number does not goes to the Mean calculation, but the function consider it like zero.In my example attached I used:Situation without select control: (2+4+6)/3 = 4Situation with select control (4+6)/3 = 3.33 (its wrong, the correct should be (4+6)/2 = 5, because I excluded the value 2.My main problem is: how to insert a Null value, not zero. Another question, the Select function is the only way to "Switch" the pass of values to other functions? This question is also related to "Case Structure" , because, for example, when the value is False, I don't want to send a zero forward, I want to send nothing!In my example, when button is pushed, the value must be excluded.Thank you very muchDaniel Mean Calculation.vi: http://forums.ni.com/attachments/ni/170/320359/1/Mean Calculation.vi Hi Daniel, the calculation is correct, because the array size is 3. Change the code in the way, that only the numbers you want are in the array. See the attached picture. <img src="http://for...

Values depending on other values
Hi all, I have to insert some rows in a database and some values in this rows depends on the values of other rows in the database. This new value must continue up to date dependig on the value of the origin data. �How could I do this? I�ve been thinking of using triggers that update the variable values but, is there any other way? Thanks in advance NegreT wrote: > Hi all, > > I have to insert some rows in a database and some values in this rows > depends on the values of other rows in the database. > > This new value must continue up to date dependig on the value of the > origin data. > > �How could I do this? I�ve been thinking of using triggers that update > the variable values but, is there any other way? > > Thanks in advance You should almost never store the result of a calculation in a relational database. Why not calculate the value on the fly for display on screen or in reports? -- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan@x.washington.edu (replace 'x' with a 'u' to reply) Hi Daniel, thanks for your reply. The situation is : - I've got a table with records (each record is a state of a sensor). - I've got a form that reads those records and can add more. What I have to do: - Users must be able to insert records with the current value of the sensor (easy). - Users must be abl...

mean-value at risk code
Hello everybody, I need a code of asset allocation which enables to minimize the value at risk of portfolio for a certain level of portfolio returns. Does anyone have this code, Thanks ...

IBM -- Billed Value Measurement?
hello, can someone please point me to a site or document(s) on Billed Value Measurement(BVM) for Business Partners w/IBM thanks, in advance Hello Paul Try this as a starting point http://www-1.ibm.com/certify/partner/na/vaeg.shtml Good Luck Dave PaulJSgroi wrote: >hello, can someone please point me to a site or document(s) on Billed Value >Measurement(BVM) for Business Partners w/IBM > >thanks, in advance > > ...

mean value of a multidimensional matrix
Hi, I really want to know how to get the mean value of a multidimensional matrix. I have a 5-D matrix. I want to transform it into 2D. The first step is to make it 4D. The fith dimension has size 3 (January, February, March). I want to make the mean value (JFM) of these values at the same time as I reduce the matrix from 5D to 4D. A_mean(:,:,:,:) = mean(A(:,:,:,:,1:3)); But this doesn't seem to be correct? I looked in the Matlab help and found the following: "If A is a multidimensional array, mean(A) treats the values along the first non-singleton dimension as vectors, returning ...

Web resources about - The meaning of sqlcode value 326 - comp.sys.ibm.as400.misc

Monty Python's The Meaning of Life (video game) - Wikipedia, the free encyclopedia
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. , a non-profit organization.

Meanings (@meaningsapp) on Twitter
Sign in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Meanings @ meaningsapp AppStore ...

Genius by Rap Genius — Search and understand the meaning of song lyrics, poetry, literature, and news ...
Get Genius by Rap Genius — Search and understand the meaning of song lyrics, poetry, literature, and news on the App Store. See screenshots and ...

4/365 The True Meaning of Christmas - Flickr - Photo Sharing!
4/365 take a photo, post a photo every day in 2009 My Website

Stowe Boyd at Meaning 2012: "Beyond social - imagining the post normal business" - YouTube
In this jam-packed talk Stowe started to share his concept of post-normal with the world, a concept he has been working on for some time and ...

The Law Professor Search for Meaning
Streamlining tenure decisions by cutting to the quick.

Nancy Reagan epitomized God's meaning of a help-meet
Proverbs says, “He who finds a wife finds a good thing.” Reagan scored a home run when he married Nancy – a woman who was 100% in his corner, ...

Working at Tesla provides meaning, stress and (relatively) low pay
Filed under: Etc. , Green , Tesla , Green Automakers , Technology Elon Musk responds to new data from PayScale about the work environment at ...

Elite media slowly absorbs the meaning of Donald Trump.
In the NYT this morning. 1. A photograph that exemplifies Donald Trump voters as they ominously approach a polling place. The sky is dark, the ...

Note To Steve Israel And Chuck Schumer: The Word Progressive Actually Has A Meaning
... far more than he hates Republicans, encourages even the most conservative Democrats stuck in a primary battle to make the word meaningless by ...

Resources last updated: 3/24/2016 12:28:43 PM