|
Couldn't you chain or setll on the first key of the OPNQRYF'd file if you made it program-described? Thanks, Dave > -----Original Message----- Message: 9 Date: Tue, 21 Jan 2003 07:52:02 -0500 From: "Richard B Baird" <rbaird@esourceconsulting.com> Subject: Re: keyfield Murali, you can specify 'k' on the F spec, but you cannot chain or setll on it, because the program has to match your keylist fields with the key fields of the file, and it doesn't know those keys at compile time. You can however read it by making it a primary file, or by just doing a 'read' in your calcs, and it will read the file in the order you specified in your opnqry. if you have to chain or setll, you could build a temporary (or even permanent, for that matter) logical file with the same key fields as your opnqry, specify that as your full procedural file, and override that name to your opnqryf at runtime. hth, rick -----original message------ 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)
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.