|
I've done some testing and searching and can't get the following to work, so I must be missing something somewhere, so hopefully one of you can help me out. The Setup ========= I have an RPG ILE service program with several subprocedures in it. One of them, IsRchStrDt, has a prototype that looks like this: D IsRchStrDt PR 1A D TestDate D DatFmt(*ISO) Value Within the service program, the procedure interface looks like this: P IsRchStrDt B Export D IsRchStrDt PI 1A D TestDate D DatFmt(*ISO) Value What this subprocedure does is determine if the date in question is a period start date (i.e., on a 28-day boundary) for a particular customer of ours. It returns a "Y" if it is on a 28-day boundary, or returns an "N" if it is not. It is used like this in RPG: Eval YesNoCode = IsRchStrDt(SomeDateFld) -or- If IsRchStrDt(SomeDateFld) = 'Y' It works great from RPG ILE calls with no problem. Now The Problem =============== I want to use it in CL ILE via CALLPRC. I've used CALLPRC before, but no too often. And there isn't a whole lot of info that I can find regarding just how to set up a date data type in CL, since CL doesn't recognize date data types. I have tried it with a *CHAR length 10 field with "2000-03-06" in the field with no luck. I have tried the subprocedure with and without the VALUE on the prototype. All I can get is invalid data in date/time/timestamp field. So I got smart. I thought. I added the following subprocedure to the service program: D IsRchStrD8 PR 1A D TestDate8 8S 0 Const and the procedure interface is: P IsRchStrD8 B Export D IsRchStrD8 PI 1A D TestDate8 8S 0 Const This subprocedure simply converts the input date to an *ISO field (which happens to be a call to another service program that does these types of conversions), then calls IsRchStrDt with the converted date. Now, I thought, I'll pass an 8-character field like "20000306". Still no work. Tried defining the field in the CLLE program as *DEC length 8. Still no work. What am I missing? Within the subprocedure, do I need to move the input parm to another field first? Thanks for any help. -- -Jeff +--- | 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.