|
First, Thank You Scott for all your help. I think you deserve an ataboy.
PGMA uses a display file to get a processing date
PGMA = MSG7AB
then puts the date in a field (*note this is not a true date
field)
this field is numeric, length of 8. Then we chgvar this field
into
&CPER so I can pass it to PGMB. (At this point &CPER is all
I'm concerned about) The SBMJOB is in PGMA.
SBMJOB CMD(CALL PGM(MSG7AE) PARM(&CPER &VPER &INCAID &WSALL)) +
JOBQ(QBATCH) JOB(STC_OUT)
still at this point &CPER is 15 5
PGMB does my opnqryf, over rides then calls my main module
PGMA = MSG7AE = module MSG7AECL and MSG7AE
I chgvar &CPER to &CALDT(8 char)
CALLPRC PRC(MSG7AE) PARM(&CALDT &VALDT &INCAID
&WSALL &RECVR)
Here's where you hit the nail on the head.
in my RPG module I have it set to receive at a length of 8 (char) (and
get blanks for SCDATE)
if I change it to a length of 8 0 then you hit the nail on the
head, I get a decimal data error.
I will try to use your logic to work around this problem. I'm just not quit
sure what gets passed, that light bulb will
come on sometime afterwhile. Thanks
And to clear up those dirty minds out there, maybe I should have said (Have I
gone completely zonkers?)
________________________________________________________________________________________
(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
Thanks
Troy C. Dills
Troy.C.Dills@Blum.com
Julius Blum Inc.
704-827-1345 ext 269
spammers not welcome !!!!!!!!!!!!!!!!!!!!!
+---
| 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-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 [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.