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



Murali -

You will need to create a dummy indexed file that is keyed the way that your
OPNQRYF creates the keyed file, and compile your program against this dummy
file (with a K in the F-Spec), in order to use the random operations like
SETLL, CHAIN, etc.  This will also require that you perform a override on
this file name to the file opened by OPNQRYF.

By doing this, the RPG compiler will include the necessary code that allows
these operation codes to be used.

Steve Landess
Austin, Texas
(512) 423-0935

----- Original Message -----
From: "N, Muralidhar" <Muralidhar.N@blr.hpsglobal.com>
To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@midrange.com>
Sent: Tuesday, January 21, 2003 9:05 AM
Subject: RE: keyfield


> My requirment is only to use opnqryf ,iam nt using logical file
> my question is that whether i can declare that file  as "K" in F-spec
since
> iam creating 3keyfields in opnqryf...hope u r clear with question!
> can i do chain on this file?
> Regards
> Murali
>
> > -----Original Message-----
> > From: MWalter@hanoverwire.com [SMTP:MWalter@hanoverwire.com]
> > Sent: Tuesday, January 21, 2003 6:38 PM
> > To: RPG programming on the AS400 / iSeries
> > Subject: Re: keyfield
> >
> >
> > Murali,
> >
> > If I understand your question, you'll have to create a logical file over
> > the physical in order to do random I/O (ie. setll/read, chain). You can
> > order your physical file with an OPNQRYF but that really should be used
> > only for sequential processing. The access path (Keyfield(s)) has to
exist
> > over the file for your RPG program to compile.
> >
> >
> > Good Luck,
> >
> > Mark
> >
> >
> > Mark Walter
> > Sr. Programmer/Analyst
> > Hanover Wire Cloth a div of CCX, Inc.
> > mwalter@hanoverwire.com
> > http://www.hanoverwire.com
> > 717.637.3795 Ext.3040
> > /"\
> > \ /
> >  X
> > / \
> >
> >
> >
> > |--------+-------------------------------->
> > |        |          "N, Muralidhar"       |
> > |        |          <Muralidhar.N@blr.hpsg|
> > |        |          lobal.com>            |
> > |        |          Sent by:              |
> > |        |          rpg400-l-bounces@midra|
> > |        |          nge.com               |
> > |        |                                |
> > |        |                                |
> > |        |          01/20/2003 11:58 AM   |
> > |        |          Please respond to RPG |
> > |        |          programming on the    |
> > |        |          AS400 / iSeries       |
> > |        |                                |
> > |--------+-------------------------------->
> >
> >
>-------------------------------------------------------------------------
> > ----------------------------------|
> >   |
> > |
> >   |       To:     "'RPG programming on the AS400 / iSeries'"
> > <rpg400-l@midrange.com>                          |
> >   |       cc:
> > |
> >   |       Subject:     keyfield
> > |
> >
> >
>-------------------------------------------------------------------------
> > ----------------------------------|
> >
> >
> >
> >
> > I ve a file DAHDRT00(which doesnt ve keyfield) ,Iam doing opnqry by
taking
> > 3fields frm the file as  3keyfields) mentioned in ascending order on
this
> > file in my CL ,from there iam calling RPG ...Can i mention Record
address
> > type "k" on this file in my rpg prog? and do chain or use setll and read
> > ?kindly suggest me ! here the code
> >
> >  OVRDBF     FILE(DAHDRT00) TOFILE(*LIBL/DAHDRT00) +
> >               MBR(*LAST) SHARE(*YES)
> >  OPNQRYF    FILE((*LIBL/DAHDRT00 *LAST)) +
> >               KEYFLD((DAHDRFCD *ASCEND) (DAHDRGRF +
> >               *ASCEND) (DAHDRHFL *ASCEND))
> >  CALL       PGM(*LIBL/DAD0070) PARM(&RTCODE)
> >  CLOF       OPNID(DAHDRT00)
> >  DLTOVR     FILE(*ALL)
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Murali
> >
> > > -----Original Message-----
> > > From:         Richard B Baird [SMTP:rbaird@esourceconsulting.com]
> > > Sent:         Thursday, January 16, 2003 6:20 PM
> > > To:           RPG programming on the AS400 / iSeries
> > > Subject:           Re: sequential read
> > >
> > >
> > > Murali,
> > >
> > > move the setll (and a primeing read) outside of your do loop -
otherwise
> > > you will read the 1st record only, an infinate number of times - an
> > > endless
> > > loop.
> > >
> > > --->
> > >
> > >   $Load_Hdr_Rec Begsr
> > >   *Start        setll     DAHDRT00
> > >                 READ      DAHDRT00
> > >
> > >                 DOW       NOT %EOF(DAHDRT00)
> > > ....process record here......
> > >                 READ      DAHDRT00
> > >                 enddo
> > >
> > > _______________________________________________
> > > 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/mailman/listinfo.cgi/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.
> > WARNING: The information in this message is confidential and may be
> > legally
> > privileged. It is intended solely for the addressee.  Access to this
> > message
> > by anyone else is unauthorised.  If you are not the intended recipient,
> > any
> > disclosure, copying, or distribution of the message, or any action or
> > omission taken by you in reliance on it, is prohibited and may be
> > unlawful.
> > Please immediately contact the sender if you have received this message
in
> > error. Thank you.
> > _______________________________________________
> > 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/mailman/listinfo.cgi/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/mailman/listinfo.cgi/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.
> WARNING: The information in this message is confidential and may be
legally
> privileged. It is intended solely for the addressee.  Access to this
message
> by anyone else is unauthorised.  If you are not the intended recipient,
any
> disclosure, copying, or distribution of the message, or any action or
> omission taken by you in reliance on it, is prohibited and may be
unlawful.
> Please immediately contact the sender if you have received this message in
> error. Thank you.
> _______________________________________________
> 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/mailman/listinfo.cgi/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 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.