Ok, I found the link to the web programming. Thanks.
Also, thanks for the help with putting the FROM in the SQL statement. But it
did not help, since I am not even getting connected to the i5, and it is not
even getting to that statement.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of rpg400-l-request@xxxxxxxxxxxx
Sent: Wednesday, September 16, 2009 11:21 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: RPG400-L Digest, Vol 8, Issue 673
Send RPG400-L mailing list submissions to
rpg400-l@xxxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/rpg400-l
or, via email, send a message with subject or body 'help' to
rpg400-l-request@xxxxxxxxxxxx
You can reach the person managing the list at
rpg400-l-owner@xxxxxxxxxxxx
When replying, please edit your Subject line so it is more specific than
"Re: Contents of RPG400-L digest..."
*** NOTE: When replying to this digest message, PLEASE remove all text
unrelated to your reply and change the subject line so it is meaningful.
Today's Topics:
1. I5_ and db2_ not working. (Tom Deskevich)
2. Re: Hoe to define Sorting for PF (Vern Hamberg)
3. Re: Hoe to define Sorting for PF (Scott Klement)
4. Re: OPTIONS(*OMIT)? (Scott Klement)
5. RE: I5_ and db2_ not working. (DeLong, Eric)
6. RE: Hoe to define Sorting for PF (DeLong, Eric)
7. Re: I5_ and db2_ not working. (MattLavinder@xxxxxxxxxxxxxxxxxxx)
8. Would you try it? I would! (sjl)
9. Re: Would you try it? I would! (David Gibbs)
10. Re: I5_ and db2_ not working. (Brian Johnson)
11. Re: Hoe to define Sorting for PF (rob@xxxxxxxxx)
----------------------------------------------------------------------
message: 1
date: Wed, 16 Sep 2009 10:29:19 -0400
from: "Tom Deskevich" <thomas.l.deskevich@xxxxxxxxxxxxx>
subject: I5_ and db2_ not working.
I am attempting to query a file on the as/400 via a php script with SQL. The
db2 commands are not working. I tried to reference the path to the
i5toolkit_library in my php script. The browser does not show me anything if
I do that. If you key db2_ and get the code completer up, does that mean it
can find the commands? I see the toolkit on my tree. I have a drive mapped
to htdocs. My php script is saved under
www/zend/htdocs/zendframeworkexamples. I can run other PHP scripts that do
not access the i5 ok that are on the same path. The zend subsystem is up and
running.
ZEND QSYS SBS .0 DEQW
I5_COMD QTCP BCH .0 PGM-EASYCOMD TIMW
ZC_STR_PRN ZENDADMIN BCI .0 PGM-prngd SELW
ZENDCOREAP ZENDADMIN BCI .0 PGM-httpd SELW
Is i5_comd what executes the toolkit class commands on the as/400 (assuming
i5_comd)? Do not see anything under the job log for that.
Here is some of the php code:
$i5link = db2_connect("infsyse","xtld90083","******") or die("failed to
connect to database"); $query = "select SDPROJ SDDESC icsrvlib.xxxsp10p";
$stmt = db2_prepare($i5link,$query) or die("<p>Failed to prepare SQL
statement</p>"); $result = db2_execute($stmt) or die("<p>Failed to execute
SQL statement</p>");
Replaced pw with *****, I have tried hard coding and using variables for
parms.
Not sure if this is the right forum, but could not find any others that
match. Thanks!
Tom Deskevich
Infocon Corporation
Phone 814-472-6066
Fax 814-472-5019
------------------------------
message: 2
date: Wed, 16 Sep 2009 09:32:56 -0500
from: Vern Hamberg <vhamberg@xxxxxxxxxxx>
subject: Re: Hoe to define Sorting for PF
Krunal
Is your field a key field? FTP does not sort anything - it takes what
you have and transfers it as it is. But if the file is indexed on a
field, it will be sent in the order of that key field. I believe so, anyhow.
I'm not sure what you mean by "hex value".
Be sure to use the ascii ftp subcommand when transferring the data. Not
binary.
Can you show us what you are seeing? Paste a few rows of the text file
into your post, please.
Vern
krunal Asodiya wrote:
HI friends,
I am facing problem in sorting of PF.
I have one PF , which i had define only one field .
Now , i write in this PF through RPGLE Program .
after this , i have to FTP this file to desktop on .TXT format , but when
i
open the file , it's sow me the sorted data by it's hex value.
I want the data as it is as , i added in PF through RPGLE Program
(same sequence ) without any sorting .
How can i do this?
Plz suggest me
Thanks and Regards,
Krunal Asodiya
------------------------------
message: 3
date: Wed, 16 Sep 2009 09:38:27 -0500
from: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
subject: Re: Hoe to define Sorting for PF
Hello,
I can only think of 2 ways this could happen:
1) Your PF is keyed.
2) You run a sort routine over your data.
If you do neither of those things, the data will be sent in the same
order that your RPG program has written it. Just make sure you're not
keying the file or sorting it, and you should have no problems.
krunal Asodiya wrote:
HI friends,
I am facing problem in sorting of PF.
I have one PF , which i had define only one field .
Now , i write in this PF through RPGLE Program .
after this , i have to FTP this file to desktop on .TXT format , but when
i
open the file , it's sow me the sorted data by it's hex value.
I want the data as it is as , i added in PF through RPGLE Program
(same sequence ) without any sorting .
How can i do this?
Plz suggest me
Thanks and Regards,
Krunal Asodiya
------------------------------
message: 4
date: Wed, 16 Sep 2009 09:41:52 -0500
from: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
subject: Re: OPTIONS(*OMIT)?
So your parameter list varies with each called program, but they all
have to go through a common router. Is that the issue?
The purpose behind a prototype is to tell the compiler exactly which
parameters will be passed and how they are used. A prototype where you
don't define the parameters to be passed (because they're variable)
would be pointless, as the compiler wouldn't be able to validate them.
If this is what you are struggling with, I'd consider a better design.
David FOXWELL wrote:
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Scott Klement
In the example of Pgm A, if PgmId= Pgm C, how would you code that
program's prototype?
I don't understand where you are stuck. This seems like such a
simple thing...
Hi Scott,
Using Simon's example :
D ROUTER PR
D errMsg 1024 (as CONST
OPTIONS(*VARSIZE) if input-only)
D PgmID 21 CONST OPTIONS(*VARSIZE)
D p1 ???? OPTIONS(*NOPASS : *OMIT)
D p2 ???? OPTIONS(*NOPASS : *OMIT)
D p3 ???? OPTIONS(*NOPASS : *OMIT)
I can see that I can code the prototype for Pgm C thus :
D ?PgmC PR
D errMsg 1024 (as CONST
OPTIONS(*VARSIZE) if input-only)
D PgmID 21 CONST OPTIONS(*VARSIZE)
Pr?suming it has no knowledge of the other parameters. In my OP, I
hadn't thought of *nopass so I was wondering how to take care of the
other parameters. If P1 was clientId for example, and PgmC did not use
the parameter and had nothing to do with clients, I'd still have to
define a parameter based on clientID.
------------------------------
message: 5
date: Wed, 16 Sep 2009 09:48:28 -0500
from: "DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx>
subject: RE: I5_ and db2_ not working.
Tom,
Where is the FROM command in your SQL statement?
$query = "select SDPROJ SDDESC from icsrvlib.xxxsp10p";
^^^^
-Eric
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Tom Deskevich
Sent: Wednesday, September 16, 2009 9:29 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: I5_ and db2_ not working.
I am attempting to query a file on the as/400 via a php script with SQL. The
db2 commands are not working. I tried to reference the path to the
i5toolkit_library in my php script. The browser does not show me anything if
I do that. If you key db2_ and get the code completer up, does that mean it
can find the commands? I see the toolkit on my tree. I have a drive mapped
to htdocs. My php script is saved under
www/zend/htdocs/zendframeworkexamples. I can run other PHP scripts that do
not access the i5 ok that are on the same path. The zend subsystem is up and
running.
ZEND QSYS SBS .0 DEQW
I5_COMD QTCP BCH .0 PGM-EASYCOMD TIMW
ZC_STR_PRN ZENDADMIN BCI .0 PGM-prngd SELW
ZENDCOREAP ZENDADMIN BCI .0 PGM-httpd SELW
Is i5_comd what executes the toolkit class commands on the as/400 (assuming
i5_comd)? Do not see anything under the job log for that.
Here is some of the php code:
$i5link = db2_connect("infsyse","xtld90083","******") or die("failed to
connect to database"); $query = "select SDPROJ SDDESC icsrvlib.xxxsp10p";
$stmt = db2_prepare($i5link,$query) or die("<p>Failed to prepare SQL
statement</p>"); $result = db2_execute($stmt) or die("<p>Failed to execute
SQL statement</p>");
Replaced pw with *****, I have tried hard coding and using variables for
parms.
Not sure if this is the right forum, but could not find any others that
match. Thanks!
Tom Deskevich
Infocon Corporation
Phone 814-472-6066
Fax 814-472-5019
As an Amazon Associate we earn from qualifying purchases.