|
On Thu, 14 Jun 2001 Troy.C.Dills@blum.com wrote: > Hello All > > Someone please help : )! This is a question continued from earlier > this morning. I have 1 CL(LE) program (PGMA) which calls another > program (PGMB) that consist of a CL (Module) Passing it some numeric > parms (15 5) still at this point, I change it to a char with a length > of 8. Here is some sample code of the CL (Module) > > (PGMA consist of 1 CL Module only) > (PGMB consist of 1 CL Module and a 1 RPG Module) > > PS, My first CL (PGMA) is using the > SBMJOB CMD(CALL PGM(MSG7AE) PARM(&CPER &VPER &INCAID &WSALL)) + > JOBQ(QBATCH) JOB(STC_OUT) (I rearranged your message to put the info about how PGMA calls PGMB next to your explanation of what they are) > > DCL VAR(&CPER) TYPE(*DEC) LEN(15 5) > DCL VAR(&VPER) TYPE(*DEC) LEN(15 5) > > DCL VAR(&CALDT) TYPE(*CHAR) LEN(8) > DCL VAR(&VALDT) TYPE(*CHAR) LEN(8) > > CHGVAR VAR(&CALDT) VALUE(&CPER) > CHGVAR VAR(&VALDT) VALUE(&VPER) > > CALLPRC PRC(MSG7AE) PARM(&CALDT &VALDT &INCAID + > &WSALL &RECVR) I'm confused. I thought "PGMA" was called MSG7AE. (That's what your SBMJOB says) but now you're referring to the RPG procedure as "MSG7AE"??? You've got CHGVAR trying to set a 8-char field equal to a 15.5 field. I don't think that'll do what you think it will :) You probably want something like this: DCL VAR(&TEMP) TYPE(*DEC) LEN(8 0) CHGVAR VAR(&TEMP) VALUE(&CPER) CHGVAR VAR(&CALDT) VALUE(&TEMP) That way you get rid of all of the trailing decimal places, and the leading decimals, and just get the 8-digits that you want. > _____________________________________________________________ > > Here is a sample of my RPG Module > > > *ENTRY PLIST > PARM CALPER 8 > PARM CADTVA 8 0 > PARM INCAID 10 > PARM WSALL 1 > PARM RECVR 10 > > Eval ScDate = CalPer > > (SCDATE is equal to 8 char) > > My program runs fine but my output is blanks for this field any ideas? > First of all, WHICH field is blank? ScDate? Second, you have CADTVA defined in your RPG as an 8-digit packed (i.e. a 5-byte variable) but in your CL you have it defined as *CHAR 8 (which is an 8-byte variable) I would expect that to cause a decimal data error for you, sooner or later... > > Am I completely off my Knockers? If I am please someone put me out of > my misery > You mean off your rocker?! I've never heard of "off my knockers". But... "knockers" may not be an appropriate topic for this forum :) Anyway, since your example didn't make sense to me, I've written a quick adaptation of what I thought you were trying to do, and it works for me... here it is: PGM PARM(&CPER &VPER) DCL VAR(&CPER) TYPE(*DEC) LEN(15 5) DCL VAR(&VPER) TYPE(*DEC) LEN(15 5) DCL VAR(&TEMP) TYPE(*DEC) LEN(8 0) DCL VAR(&CALDT) TYPE(*CHAR) LEN(8) DCL VAR(&VALDT) TYPE(*CHAR) LEN(8) CHGVAR VAR(&TEMP) VALUE(&CPER) CHGVAR VAR(&CALDT) VALUE(&TEMP) CHGVAR VAR(&TEMP) VALUE(&VPER) CHGVAR VAR(&VALDT) VALUE(&TEMP) CALLPRC PRC(MSG7AE2) PARM(&CALDT &VALDT) ENDPGM D testdate S 8A c *entry plist c parm calper 8 c parm cadtva 8 c eval testdate = calper c dsply testdate c eval testdate = cadtva c dsply testdate c return +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.