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



At 11:15 PM 12/10/2006, you wrote:

Hi Jitendra

I'm not sure I completely understand what you want to do - but here is my interpretation = you want a report with the column headings and the data under those headings.

I think you are working much too hard. I also think you should look at QM queries and forms. These do not use RPG at all - they can be executed from RPG or CL.

Start with the command STRQM - take option 1 - if it says PROMPT near the top, press F19 to change it to SQL.

Create a new query - put in an SQL SELECT statement - you can prompt it just as you can in interactive SQL. This will give you a simple basic report - it will have the column headings and the data below - simple.

You can do much more with QM, but this is a good start. There is a manual on Query Manage Use at the database section of the iSeries infocenter www.iseries.ibm.com/infocenter

HTH
Vern


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

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com

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

message: 5
date: Sat, 9 Dec 2006 22:38:49 -0600
from: Mike <koldark@xxxxxxxxx>
subject: Re: Does anyone use indicators anymore?

Can I use that as a quote? Awesome!

On 12/8/06, Alan Campin <Alan.Campin@xxxxxxxxxxxxxxxx> wrote:
>
>
> This best statement I ever read about indicators was years and years
> ago.
>
> "Indicators are like Atomic Bombs. Handy to have but you should never
> use them unless you have too."
>
> Told that to guys in my shop who still think you should use indicators
> for everything.
>

--
Mike Wills
Blog - http://mikewills.name
Podcasts - http://theriverbendpodcast.com


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

message: 6
date: Sun, 10 Dec 2006 00:20:19 -0800
from: "Tom Huff" <tehuff@xxxxxxxxxxxxx>
subject: RE: Does anyone use indicators anymore?

I think Charlie Massagolia (SP?) Said that first. About 20 years ago.
Tom

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike
Sent: Saturday, December 09, 2006 8:39 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Does anyone use indicators anymore?

Can I use that as a quote? Awesome!

On 12/8/06, Alan Campin <Alan.Campin@xxxxxxxxxxxxxxxx> wrote:
>
>
> This best statement I ever read about indicators was years and years
> ago.
>
> "Indicators are like Atomic Bombs. Handy to have but you should never
> use them unless you have too."
>
> Told that to guys in my shop who still think you should use indicators
> for everything.
>

--
Mike Wills
Blog - http://mikewills.name
Podcasts - http://theriverbendpodcast.com
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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

message: 7
date: Sun, 10 Dec 2006 08:54:56 -0600
from: Vernon Hamberg <vhamberg@xxxxxxxxxxx>
subject: Re: SQL Question - ILE

Any reason that you are not changing the library list? Just jumping
at the end here.

At 03:42 PM 12/9/2006, you wrote:

>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
>
>--
>This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
>To post a message email: RPG400-L@xxxxxxxxxxxx
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
>or email: RPG400-L-request@xxxxxxxxxxxx
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/rpg400-l.
>
>
>
>___________________________________________________________________ _________________
>Need a quick answer? Get one in minutes from people who know.
>Ask your question on www.Answers.yahoo.com
>--
>This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
>To post a message email: RPG400-L@xxxxxxxxxxxx
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
>or email: RPG400-L-request@xxxxxxxxxxxx
>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) digest list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



End of RPG400-L Digest, Vol 5, Issue 1354
*****************************************



__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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 thread ...

Replies:

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.