|
I think you missed the main point though, Troy. What happens if I move a 15,5 numeric field into an 8 char field? It will take the left 8 characters for the number and throw the rest away. I suspect on a good day you are getting garbage in your 8 char field. Consider the date 6/15/01. 0000061501.00000 Move this to an 8 char and you take the left 8 digits. '00000615' That is not what you wanted. So, in your CL, you declare a holding variable as being 8 numeric and move it into there first. 0000061501.00000 moved into 8 numeric becomes 061501 which is what you want. In my programs that did this, I also then moved this into my 8 char which gives me the correct var to pass '061501' although I think it would be perfectly fine to just pass the 8 numeric, I didn't do enough testing at the time, I just wanted to finish the project (yeah, I know, bad programmer, bad!) Regards, Jim Langston Me transmitte sursum, Caledoni! Troy.C.Dills@blum.com wrote: > > 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?) +--- | 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.