|
Hi Hilda, In addition to reversing the variables on the CHGVAR stmt, if field SORD in file FSO is a numeric field, you will have to remove the double quotes (") from your QRYSLT: CHGVAR VAR(&QRYSLT) VALUE('SORD *EQ ' *CAT &SONA) OPNQRYF FILE((FSO)) QRYSLT(&QRYSLT) KEYFLD((SORD)) hth, Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax ----- Original Message ----- From: "Hilda Shing" <iph35@yahoo.com.sg> To: <rpg400-l@midrange.com> Sent: Friday, August 24, 2001 2:05 AM Subject: RE: OPNQRYF Thks,the compilation went thro' but on execution the pgm encountered error 'CPF0818 received by GBHRESETC at 552' the line no. where I have inserted this line : 552 CHGVAR VAR(&SONO) VALUE(&SONA) The error message : CPF0818 is Value cannot be converted to type implied by receiver. >From my screen, the user is entering a numeric shop order no. The A-spec is as such : A SONO 6Y 0B 11 42EDTCDE(Z) Part of my code : SNDRCVF RCDFMT(SORES) IF COND(&IN03 *EQ '1') THEN(GOTO CMDLBL(EXIT)) CHGVAR VAR(&SONO) VALUE(&SONA) CHGVAR VAR(&QRYSLT) VALUE('SORD *EQ "' *CAT &SONA + *CAT '"') OPNQRYF FILE((FSO)) QRYSLT(&QRYSLT) KEYFLD((SORD)) CALL PGM(GBHRESET) PARM(&SONO) I tried ebugging but do not seem to be able to detect what is wrong, is there anyone could help on this ? --- Nj�l Fisketj�n <n.f@figu.no> wrote: > > 524- > > 551- /* > > 553- CHGVAR VAR(&QRYSLT) VALUE('SORD *EQ > "' > > *CAT &SONO + > > 554 *CAT '"') > > > You have to define a character field with the same > length as > the numeric field SONO, e.g. SONOA, and use that in > the CHGVAR > statement: > > DCL &SONOA *CHAR x > > > CHGVAR &SONA &SONO > CHGVAR &QRYSLT ('&SORD� *CAT &SONOA *CAT '"') > > > > > _______________________________________________ > 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/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > __________________________________________________ Do You Yahoo!? Yahoo! Y! Pages - Search or browse for business listings. http://yp.yahoo.com.sg/ _______________________________________________ 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/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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 copyright@midrange.com.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.