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



Rob,
Thanks a bunch for the sample program. I appreciate it very much. Like I said, I am a novice RPG programmer so it will take some time for me to get it all together but I follow your sample completely. I will let you know how it goes. I will let you know if I have any questions. Thanks for your help.

Mike.


From: rpg400-l-request@xxxxxxxxxxxx
Reply-To: rpg400-l@xxxxxxxxxxxx
To: rpg400-l@xxxxxxxxxxxx
Subject: RPG400-L Digest, Vol 5, Issue 317
Date: Tue, 14 Mar 2006 11:01:15 -0600
MIME-Version: 1.0
Received: from mail.midrange.com ([69.3.23.28]) by bay0-mc2-f7.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 14 Mar 2006 09:26:44 -0800 Received: from rivendell.midrange.com (localhost [127.0.0.1])by mail.midrange.com (8.13.4/8.13.4) with ESMTP id k2EH2YQn004199for <mike_troxclaire@xxxxxxxxxxx>; Tue, 14 Mar 2006 11:02:54 -0600
X-Message-Info: JGTYoYF78jF7Cc7xDo0uVusrqqDONnC4CzAwjYuBSAw=
X-BeenThere: rpg400-l@xxxxxxxxxxxx
X-Mailman-Version: 2.1.7
Precedence: list
List-Id: RPG programming on the AS400 / iSeries <rpg400-l.midrange.com>
List-Unsubscribe: <http://lists.midrange.com/mailman/listinfo/rpg400-l>,<mailto:rpg400-l-request@xxxxxxxxxxxx?subject=unsubscribe>
List-Archive: <http://archive.midrange.com/rpg400-l>
List-Post: <mailto:rpg400-l@xxxxxxxxxxxx>
List-Help: <mailto:rpg400-l-request@xxxxxxxxxxxx?subject=help>
List-Subscribe: <http://lists.midrange.com/mailman/listinfo/rpg400-l>,<mailto:rpg400-l-request@xxxxxxxxxxxx?subject=subscribe>
Errors-To: rpg400-l-bounces+mike_troxclaire=hotmail.com@xxxxxxxxxxxx
Return-Path: rpg400-l-bounces+mike_troxclaire=hotmail.com@xxxxxxxxxxxx
X-OriginalArrivalTime: 14 Mar 2006 17:26:45.0509 (UTC) FILETIME=[77A76350:01C6478C]

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: Lat/Long RPGLE, and tornadoes (rob@xxxxxxxxx)
   2. RE: Field interpreted differentlybetweenphysicalandlogical
      (Lapeyre, Francis)
   3. RE: Field interpreted differentlybetweenphysicalandlogical
      (Jon Paris)
   4. RE: Image processing using Native AS/400 (Shannon ODonnell)
   5. RE: Field interpreted differentlybetweenphysicalandlogical
      (Rick.Chevalier@xxxxxxxxxxxxxxx)
   6. SQL Embedded in RPG ILE. (Mike Troxclaire)
   7. Re: SQL Embedded in RPG ILE. (rob@xxxxxxxxx)


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

message: 1
date: Mon, 13 Mar 2006 16:35:19 -0500
from: rob@xxxxxxxxx
subject: RE: Lat/Long RPGLE, and tornadoes

30 day free trial of
http://worksright.com/z4lln.html

Give it a try.  Source included!

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Douglas W. Palme" <dpalme@xxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/13/2006 04:12 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Lat/Long RPGLE, and tornadoes






we are doing something somewhat similar but we are working on a street
level
node operation where we calculate the distance between two points,
generally
less than 10 miles apart, which we use to calculate routing.

It is more or less a work of theory at this point.


On Mon, 13 Mar 2006 14:51:39 -0600, Ed Murphy wrote
> Douglas,
> In a previous life, I worked for National Trucking Company.
> I took the sat(Qualcomm) Lon/Lat and cross referenced it to a Mile Maker
> map point, and got a pretty good route re-creation for operations to
> review.
> Ed
>
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Douglas W. Palme
> Sent: Monday, March 13, 2006 10:51 AM
> To: RPG Group
> Subject: Lat/Long RPGLE, and tornadoes
>
> After a night of three tornadoes, roof damage, water damage, debris
> everywhere, its time to concentrate on something other than insurance
> claims.....
>
> Has anyone ever calculated distance with Lat/Long in RPGLE?
>
> I do not believe that RPGLE natively supports Cosine, sine, etc.
>
> Any help in pointing me in the correct direction would be appreciated.
>
> If you bought it, it was hauled by a truck - somewhere, sometime.
>
> --
> 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.
>
> NOTICE: This electronic mail message and any files transmitted with
> it are intended exclusively for the individual or entity to which it
> is addressed. The message, together with any attachment, may contain
> confidential and/or privileged information. Any unauthorized review,
> use, printing, saving, copying, disclosure or distribution is
> strictly prohibited. If you have received this message in error,
> please immediately advise the sender by reply email and delete all
copies.
>
> --
> 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.


If you bought it, it was hauled by a truck - somewhere, sometime.

--
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: 2
date: Mon, 13 Mar 2006 15:55:57 -0600
from: "Lapeyre, Francis" <FLAPEYRE@xxxxxxxx>
subject: RE: Field interpreted differentlybetweenphysicalandlogical

Or, maybe just declare the file as input, full procedural on the f-specs?
You don't have to do any I/O. the definitions will be in the program, and
you can get rid of the DS.

Francis Lapeyre
IS Dept. Programmer/Analyst
Stewart Enterprises, Inc.
E-mail: flapeyre@xxxxxxxx



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Rick.Chevalier@xxxxxxxxxxxxxxx
Sent: Monday, March 13, 2006 3:06 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Field interpreted differentlybetweenphysicalandlogical


I hadn't thought of using CONST to resolve the differences.  I'll have to
give it a try.

Rick

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lapeyre, Francis
> Sent: Monday, March 13, 2006 2:30 PM
> To: 'RPG programming on the AS400 / iSeries'
> Subject: RE: Field interpreted differentlybetweenphysicalandlogical
>
> Okay, I think that might be your issue. Even though the DS is
> externally described, all the numeric fields subfields therein will be
> defined as zoned in the program, regardless of how they are defined in
> the file. If your function expects a packed field,  it will be
> disappointed.
>
> If the packed parameters are not changed in the function, add CONST to
> them on the prototype.
>
> You can use VALUE on them instead, but only if the prototype does not
> refer to an external program (EXTPGM).
>
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
> On Behalf Of Rick.Chevalier@xxxxxxxxxxxxxxx
> Sent: Monday, March 13, 2006 1:37 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: RE: Field interpreted differentlybetweenphysicalandlogical
>
>
> No, there aren't any VALUE or CONST keywords.  The DS is externally
> described and exists solely so that I can reference the prototype
> fields back to the data file.
>
> Rick
>
> > -----Original Message-----
> > From: rpg400-l-bounces@xxxxxxxxxxxx
> > [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lapeyre, Francis
> > Sent: Monday, March 13, 2006 11:10 AM
> > To: 'RPG programming on the AS400 / iSeries'
> > Subject: RE: Field interpreted differentlybetweenphysicalandlogical
> >
> > Subfields of data structures, if they are numeric, will be zoned
> > unless you explicitly define them as packed in the DS.
> >
> > Does the prototype have Const or Value keywords on the fields in
> > question?
> >
> > Francis Lapeyre
> > IS Dept. Programmer/Analyst
> > Stewart Enterprises, Inc.
> > E-mail: flapeyre@xxxxxxxx
>
> Privileged and Confidential.  This e-mail, and any attachments there
> to, is intended only for use by the
> addressee(s) named herein and may contain privileged or confidential
> information.  If you have received this e-mail in error, please notify
> me immediately by a return e-mail and delete this e-mail.  You are
> hereby notified that any dissemination, distribution or copying of
> this e-mail and/or any attachments thereto, is strictly prohibited.
>
> --
> 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) 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.
>
>
>

Privileged and Confidential.  This e-mail, and any attachments there to, is
intended only for use by the addressee(s) named herein and may contain
privileged or confidential information. If you have received this e-mail in
error, please notify me immediately by a return e-mail and delete this
e-mail.  You are hereby notified that any dissemination, distribution or
copying of this e-mail and/or any attachments thereto, is strictly
prohibited.

--
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: 3
date: Mon, 13 Mar 2006 16:56:24 -0500
from: "Jon Paris" <Jon.Paris@xxxxxxxxxxxxxx>
subject: RE: Field interpreted differentlybetweenphysicalandlogical

>> The DS is externally described and exists solely so that I can reference
the prototype fields back to the data file.

This seems like a good idea until you encounter the kinds of problems you
are seeing! In practice using LIKE on protos is probably not a good idea on
the whole.

The problem is basically a simple one.

Assume two fields in the file.

F1 is packed, and F2 is zoned.

Define an external DS based on this field and in that DS.F1 is packed and
DS.F2 is zoned.

Define the actual file itself on an F-spec however and _both_ File.F1 and
File.F2 will be zoned.

So if you say LIKE(DS.F2) in a prototype you just told the compiler to
define the parm as zoned.  However, try to pass File.F2 and you will get a
parm mis-match since it is a zoned field.


The cure is either to stop doing it and hard code the desired parameter
characteristics, use CONST on the prototype, or always define an external
non-qualified DS based on the file in the program so that the input field
format will match.


Jon Paris
Partner400

www.Partner400.com
www.RPGWorld.com



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

message: 4
date: Mon, 13 Mar 2006 09:27:48 -0600
from: "Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxx>
subject: RE: Image processing using Native AS/400

It's relatively easy to manipulate images using Java on the iSeries (or any
platform really).  Here's a link to an article I wrote that has some sample
code you can borrow to build from.

How to Convert HTML into JPEG

http://www.itjungle.com/mpo/mpo062002-story01.html


Because Microsoft has made so many security enhancements to the IE browser,
the java script part of this may  no longer work, but the java code will.
Just download it and compile it on your iSeries.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Blake Moorcroft
Sent: Monday, March 13, 2006 8:46 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Image processing using Native AS/400

   Hello all...

   Has anyone ever run into a situation where they've needed to perform
image
processing on the iSeries, specifically with regards to annotating images and resizing them? I know the QIMGCVTI API allows for conversion from one
   format to another, but we're looking to do a bit more and we need it to
   remain on the iSeries platform rather than run it on a separate server
and
   then move the images around.

   The majority of the programming done here is in ILE RPG but that is not
   considered an obstacle if we find the right tool to perform the images
   adjustments.

   Have a good day.

   Blake Moorcroft
   Developer - Corporate
   Russell A. Farrow Limited
   1980 Ambassador Drive, PO Box 333, Windsor, Ontario N9C 2L6
   Bus: 519-966-3003 ext. 566, Fax: 519-966-9870
   blake.moorcroft@xxxxxxxxxx

   **********************************************************************
   This electronic message contains information from Russell A. Farrow
   Limited, Russell A. Farrow (U.S.) Inc., canadaplus.com or RAF Express
Inc.
   that may be confidential or privileged. The information in this
electronic
   message is only for the use of the intended recipient. Inappropriate
   disclosure, copying, distribution or other use of the contents of this
   electronic message is strictly prohibited. If you have received this
electronic transmission in error, please notify the sender immediately by
   return e-mail. Thank you.
   ***********************************************************************
--
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: 5
date: Tue, 14 Mar 2006 07:59:08 -0600
from: <Rick.Chevalier@xxxxxxxxxxxxxxx>
subject: RE: Field interpreted differentlybetweenphysicalandlogical


Jon,

I'm beginning to question whether this really is a good idea.  Due to
deadlines I coded around the issue by moving the database fields into
the DS fields prior to the call.  The CONST solution sounds like it
might work better.  I'll have to try it when I get the chance.

Rick

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
> Sent: Monday, March 13, 2006 3:56 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: RE: Field interpreted differentlybetweenphysicalandlogical
>
>  >> The DS is externally described and exists solely so that
> I can reference the prototype fields back to the data file.
>
> This seems like a good idea until you encounter the kinds of
> problems you are seeing!  In practice using LIKE on protos is
> probably not a good idea on the whole.
>
> The problem is basically a simple one.
>
> Assume two fields in the file.
>
> F1 is packed, and F2 is zoned.
>
> Define an external DS based on this field and in that DS.F1
> is packed and
> DS.F2 is zoned.
>
> Define the actual file itself on an F-spec however and _both_
> File.F1 and
> File.F2 will be zoned.
>
> So if you say LIKE(DS.F2) in a prototype you just told the
> compiler to define the parm as zoned.  However, try to pass
> File.F2 and you will get a parm mis-match since it is a zoned field.
>
>
> The cure is either to stop doing it and hard code the desired
> parameter characteristics, use CONST on the prototype, or
> always define an external non-qualified DS based on the file
> in the program so that the input field format will match.
>
>
> Jon Paris
> Partner400
>
> www.Partner400.com
> www.RPGWorld.com

Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.



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

message: 6
date: Tue, 14 Mar 2006 10:30:22 -0600
from: "Mike Troxclaire" <mike_troxclaire@xxxxxxxxxxx>
subject: SQL Embedded in RPG ILE.

Hello Gurus,
I am a novice RPG programmer. I think I have got the basics down and
starting to appreciate the language. I want to explore the power of SQL in
RPG. I am looking for a very basic program to follow. For example if I have
a file called CUSTOMER in a library MYLIB.


My SQL statement would be :

select * from MYLIB.CUSTOMER where CNUM = '12345'

I want to create a report using a RPG program which utilizes the above SQL
statement. The output file could be QPRINT.

The CUSTOMER table has only 3 fields. CNUM, FNAME, LNAME.

Any help in this matter would be much appreciated.

Cheers,

Mike.

_________________________________________________________________
Don?t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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

message: 7
date: Tue, 14 Mar 2006 12:01:01 -0500
from: rob@xxxxxxxxx
subject: Re: SQL Embedded in RPG ILE.

That's a single record fetch, right?  There's only 1 customer in your
CUSTOMER file with that customer number?

Then the following would work.  If, however, you wanted to fetch all
records where last name sounded like 'Berendt' then let me know.  That
involves using a cursor and I can whip up a sample like that also.

     H ActGrp(*CALLER)
     H DftActGrp(*NO)

     D Customer      e ds                  EXTNAME(CUSTOMER)
     D OpenStuff       PR              n
     D FetcuStuff      PR              n
     D SampleCust                          like(cnum) inz(12345)

      /free
       *inlr=*on;
       if not OpenStuff();
         // perform error routine to alert the troops
         // ...
       Else;
         If FetchStuff(SampleCust);

           // normal processing here...

         EndIf;
       EndIf;
       return;
      /end-free
      // End of program is right here.


     P OpenStuff       B
     D OpenStuff       PI                  like(ReturnVar)
     D ReturnVar       s               n

     C/EXEC SQL
     C+ Set Option
     C+     Naming    = *Sys,
     C+     Commit    = *None,
     C+     UsrPrf    = *User,
     C+     DynUsrPrf = *User,
     C+     Datfmt    = *iso,
     C+     CloSqlCsr = *EndMod
     C/END-EXEC


      /free
       stmt1='select cnum, lname, fname ' +
             'into :cnum, :lname, :fname ' +
             'from customer where cnum=?';
      /end-free
     C/EXEC SQL
     C+ Prepare S1 from :stmt1
     C/END-EXEC

      /free
       Select;
         When SqlStt='00000';
           return *on;
         Other;
           return *off;
       EndSl;
      /end-free
     P OpenStuff       E

      /eject
     D FetchStuff      PI                  like(ReturnVar)
     D  ThisCust                           like(cnum)
     D ReturnVar       s               n

     C/EXEC SQL
     C+ Execute S1 using :ThisCust
     C/END-EXEC

     P FetchStuff      E


Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Mike Troxclaire" <mike_troxclaire@xxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/14/2006 11:30 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
SQL Embedded in RPG ILE.






Hello Gurus,
I am a novice RPG programmer. I think I have got the basics down and
starting to appreciate the language. I want to explore the power of SQL in

RPG. I am looking for a very basic program to follow. For example if I
have
a file called CUSTOMER in a library MYLIB.


My SQL statement would be :

select * from MYLIB.CUSTOMER where CNUM = '12345'

I want to create a report using a RPG program which utilizes the above SQL

statement. The output file could be QPRINT.

The CUSTOMER table has only 3 fields. CNUM, FNAME, LNAME.

Any help in this matter would be much appreciated.

Cheers,

Mike.

_________________________________________________________________
Don?t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

--
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 317
****************************************

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


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.