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



hi jitendra,

when you have the name of the file, create an override for that file(in a 
seperate CL or inside the same RPG using QCMDEXEC) and use the override name in 
your RPG program,so that you can read the data from the override(which actually 
has the data of the file passed as parameter).


regards,
Bala.
----- Original Message ----
From: Jitendra Bokshe <jitendra_pb@xxxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Sent: Monday, December 11, 2006 10:45:21 AM
Subject: How I can get the Data of a PF in Printer File


Hi Group,

I am getting the column heading in a printer file from SYSCOLUMNS. Now the 
problem is that How I can get the data of that file to load it in to printer 
file 
below this column heading. 
I am passing the file name as parameter during CALL of this RPG Program. 
Because of that I can't read that file...So is there any way to get the data 
of a file which is passing as a parameter to program.?? 
My program is aware of data types of the field. I mean ...I know when the 
field is numeric, date, time, or timestamp....

Is there any API to get the Data ??
or how it is possible to Use a dynamic SQL statement to fetch the data into a 
single character 
string and parse based on field lengths.

Thanks in advance.....

Jitendra


----- Original Message ----
From: "rpg400-l-request@xxxxxxxxxxxx" <rpg400-l-request@xxxxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Sent: Sunday, 10 December, 2006 11:30:05 PM
Subject: RPG400-L Digest, Vol 5, Issue 1354


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. Re: Does anyone use indicators anymore? (David Gibbs)
   2. Re: Does anyone use indicators anymore? (David Gibbs)
   3. Re: Does anyone use indicators anymore? (Scott Klement)
   4. Re: SQL Question - ILE (Jeff Young)
   5. Re: Does anyone use indicators anymore? (Mike)
   6. RE: Does anyone use indicators anymore? (Tom Huff)
   7. Re: SQL Question - ILE (Vernon Hamberg)


----------------------------------------------------------------------

message: 1
date: Sat, 09 Dec 2006 12:10:56 -0600
from: David Gibbs <david@xxxxxxxxxxxx>
subject: Re: Does anyone use indicators anymore?

Jon Paris wrote:
Display and printer files can also make use of the INDDS keyword on the F
spec to allow the numbered indicators to be mapped to a DS containing named
indicators.

Thanks for that clarification, Jon ... I don't work with display files
enough these days to be familiar with that (I work more on system to
system stuff ... and a bit of GUI).

I will put this on my 'things to remember' list though ... next time I
have to deal with a workstation file :)

david


------------------------------

message: 2
date: Sat, 09 Dec 2006 12:29:20 -0600
from: David Gibbs <david@xxxxxxxxxxxx>
subject: Re: Does anyone use indicators anymore?

James H H Lampert wrote:
Well, I did say _modern_ RPG.

FOR PITY'S SAKE! The primary elements of RPG that 
distinguish it from all other languages are (1) its source 
format, and (2) The Cycle.

You get rid of those, and why in blazes should you still 
call it RPG?

Same reason you call java "Java" ... it's a name.

I haven't used the RPG cycle in 15+ years.  The applications I develop
just aren't conducive to it.  Of course it's also been a very long time
since I've written an actual _report_ in RPG.

But occasionally, I run into problems (as with 
my earlier project involving reading an 
externally-described file into a data structure) in which 
the "ER" condition is equivalent to the "NF" condition, 
and the simplest way to keep the program from locking up 
is to stick an indicator in the appropriate column for the 
ER and NF conditions, and use it instead of %FOUND. 

Wouldn't the (e) extender and %error bif be easier to understand than
the ER indicator?

Likewise, it is not inconceivable that even 
%FOUND(<filename>) might get polluted by the time I 
actually need to know whether a record was found, and 
sticking an indicator in NF is more convenient than 
defining a variable to hold the %FOUND result.

Maybe ... but if it comes down to that, I would far prefer to have a
named boolean variable to hold that information so it's obvious what I'm
checking.

And of course, you may want to take some action depending 
on whether an arithmetic operation produced a positive, 
negative, or zero result; indicators save you from having 
to do comparisons on the result.

I would rather sacrifice a few cpu cycles for the sake of readability.

david



------------------------------

message: 3
date: Sat, 9 Dec 2006 14:24:22 -0600 (CST)
from: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
subject: Re: Does anyone use indicators anymore?

FOR PITY'S SAKE! The primary elements of RPG that
distinguish it from all other languages are (1) its source
format, and (2) The Cycle.

You get rid of those, and why in blazes should you still
call it RPG?

Take a look at the first model of telephone released by Bell.  Then look 
at today's cell phones.  They don't look anything alike, do they?  But 
they're still called telephones.

Take a look at the cars that were originally made popular in the early 
1900's, and then look at todays cars.  They look nothing alike, yet are 
still called cars.

Or on an even more extreme comparison, take the wheel.  The original chunk 
of log to today's aluminum-rimmed, highly engineered wheels with their 
rubber inflatable tires.  Nothing alike, yet still called wheels.

Heck, I don't look the same as I did when I was 3.  Yet I still have the 
same name.

Computers technology is no different.

Compare today's 21" flat screen LCD monitors against the green and black, 
30 pound, heavy piece of equipment we called monitors back in the 1970s. 
We still call them monitors, don't we?

Or the little desktop laser printer against the 4 ft cube band printer we 
used to use.  Todays laser printers are faster and have similar duty 
cycles to the band printers we used in the 70s -- yet they're still called 
printers.

RPG is called RPG because that's what it is.  It has gradually (very 
gradually!) evolved over the past 40 years.  Todays RPG doesn't always 
look exactly like it did 20 years ago.  That's normal -- it's the way the 
world works.  Things evolve and change and improve.

Just because something has changed doesn't mean that you have to change 
it's name.  (Shhhh...  don't tell IBM.)


------------------------------

message: 4
date: Sat, 9 Dec 2006 13:42:08 -0800 (PST)
from: Jeff Young <cooljeff913@xxxxxxxxx>
subject: Re: SQL Question - ILE

My problem is that I am attempting to use the same SQL statement for either 
file, using the OVRDBF command to switch between them.
This is all happening in the same module.
It seems that since RPG shows the files as Open (under the open files option 
for DSPJOB), it is not accepting my OVRDBF command.
I have not been able to find any method to close the files opened by SQL.
Some of the files were in fact opened using a cursor, but the cursor was closed 
prior to a new OVRDBF being issued.
If there is no way to close these files completly prior to the end of the 
module, I may have to try using the PREPARE with the actual file name, rather 
than normal static SQL statements.

Thanks,


Jeff Young 
Sr. Programmer Analyst
Dynax Solutions, Inc.
A wholly owned subsidiary of enherent Corp.
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions Designer 
V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical Solutions 
Implementer V5R3 


  






----- Original Message ----
From: R Bruce Hoffman <bruce.hoffman@xxxxxxxxxxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Friday, December 8, 2006 5:30:50 PM
Subject: Re: SQL Question - ILE


Does the module end? If so, then check the CLOSQLCSR setting on the
compile. If not, then have you tried using aliases? If you must, RPG
does an implicit connect. Try disconnecting and reconnecting to the
database.


On Fri, 2006-12-08 at 12:39 -0800, Jeff Young wrote:
I have an ILE RPG SQL module that selects data from files using SQL.
The data is selected either by the Select INTO or other methods that do not 
use a cursor.
Based on a field in my input, the actual files I am using will be overriden 
to different files with the exact same format, but different names.
The problem I seem to be having, is that even though the override is in 
effect at the activation group level, the open files for the job show only 
the first set of files.
In addition, when I attempt to retreive data from the 2nd set of files, the 
query seems to be ignoring the override and using the first set.
Is there any way I can force the files to close when I need to change 
overrides?

Thanks,
 
Jeff Young 
Sr. Programmer Analyst
Dynax Solutions, Inc.
A wholly owned subsidiary of enherent Corp.
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions 
V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions 
Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical Solutions 
Implementer V5R3


 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.