|
Buck, Sorry, didn't that second mail of yours. So does that mean packed is not allowed for such kind of operations. Can somebody explain what the various kinds of restrictions are there for packed opertions Sunil ----- Original Message ----- From: "Sunil R" <sunil_ramakumar@usswi.com> To: <rpg400-l@midrange.com> Sent: Thursday, June 27, 2002 11:41 AM Subject: Re: Doubt on prerun time array And a doubt about batch job > Rick, > > I was trying out the preruntime array. I had leanred that there are the > keywords tofile and fromfile. So tried them out. > Tofile does write into a new file. > Was not trying for any project :) > I could get the program running by get changing the datatype as zoned. > Thanks for the tip > > Buck, > > I was not able to get the program running by specifing the data type as > packed. Can you please explain a little more. > > Regards and thanks > Sunil. > > ----- Original Message ----- > From: "Richard B Baird" <rbaird@esourceconsulting.com> > To: <rpg400-l@midrange.com> > Sent: Wednesday, June 26, 2002 7:27 PM > Subject: Re: Doubt on prerun time array And a doubt about batch job > > > > > > Sunil, > > > > first a couple of questions, and maybe your answer: > > > > 1. why are you specifying a 'tofile'. do you want the array to be written > > to PF5? I'm not sure, but i think that's what tofile() means. > > > > > > > 2. how many records did you add to PF1? if more than one, your program > > will bomb - too many elements - array not big enough - DIM(1) > > > > 2. I think that using a packed field as your input table file is what's > > causing your problem. The program has no way of determining that the > > input file is packed data, since it is internally described to the > program. > > So, it just assumes character and lays in on top of the array field. > > > > Can you change PF1 to be 9S 0 instead of 9P 0? I've tested this and it > > works fine. > > > > here is my program: > > > > FTESTING IT F 9 DISK > > DARE S 9S 0 DIM(12) > > D FROMFILE(TESTING) > > C ARE(1) DSPLY > > C ARE(2) DSPLY > > C ARE(3) DSPLY > > C ARE(4) DSPLY > > C ARE(5) DSPLY > > C ARE(6) DSPLY > > C ARE(7) DSPLY > > C ARE(8) DSPLY > > C ARE(9) DSPLY > > C ARE(10) DSPLY > > C ARE(11) DSPLY > > C ARE(12) DSPLY > > C EVAL *INLR = *ON > > > > and my PF (TESTING) > > > > A R TESTR > > A DATA 9S 0 > > A K DATA > > > > > > hope this helps. > > > > Rick > > > > -----original message-------- > > I have some doubts > > 1) Am I right in saying that program creates a temporary program described > > table where the values from the pf is loaded and used during the execution > > of the program. > > 2) Does the Table file have ant relation to the create Table in SQL/400. > > I was not able to declare the file directly in the Table in the d spec. > > 3) I am getting an error when I run the program with packed decimal fields > > I > > am getting junk during the transformation i.e from the File to the Table > > resulting in a decimal data error. > > I am not getting any error if I change the fields as char. > > Also no error if I don't put any values in the pf. > > I am including the code that I had tried out. So that you can get the > > correct picture. > > > > The program > > > > FPF1 IT F 10 DISK > > FPF5 CT F 10 DISK > > DARE S 9P 0 DIM(1) > > D FROMFILE(PF1) > > D TOFILE(PF5) > > C ARE(1) DSPLY > > C EVAL *INLR = *ON > > > > The PF > > R PF > > FLD1 9P 0 > > K FLD1 > > > > Thankyou very much for your help > > > > Sunil > > > > _______________________________________________ > > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > > To post a message email: RPG400-L@midrange.com > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > > or email: RPG400-L-request@midrange.com > > 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@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. >
As an Amazon Associate we earn from qualifying purchases.
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.