× 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.



This is just for any other struggling PHP beginner who reads these posts.

Taking the Or(die statements out of my code made it work.

Going to the web programming page and searching for help. I found another
example and it did not have or(die on them.


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.

This thread ...

Follow-Ups:

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.