Receive date as parameter in an RPGLE program

1580 pts.
Tags:
AS/400
RPGLE
RPGLE Program
Hi all,
I want to receive date as parameter in an RPGLE program, there is no option to mention data type in parameter list. How do I do that?
Regards.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Use SNDDTAQ/RCVDTAQ to send and receive date.
Are you looking for today’s date?

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • hunshabbir7
    Thanks for reply

    I already done that. I passed it as Numeric (8 0) as my year was of 4 length. It means date can not be received as Date data type. 
    1,580 pointsBadges:
    report
  • BigKat
    if you define the date fields in the d-specs, you can use them in the *ENTRY PLIST

    D InvDate         S               D   DATFMT(*ISO)
    D DueDate         S               D   DATFMT(*ISO)
    D DiscDate        S               D   DATFMT(*ISO)
    
    
    
     ****************************************************************
     * ENTRY PARMS - PAY PERIOD RANGE                                
     ****************************************************************
    C     *ENTRY        PLIST                                        
    C                   PARM                    InvDate           
    C                   PARM                    Terms             5  
    C                   PARM                    DueDate           
    C                   PARM                    DueH              6 0
    C                   PARM                    DiscDate          
    C                   PARM                    DiscH             6 0 
    
    8,210 pointsBadges:
    report
  • BigKat
    okay, I tried replying, and it didn't seem to take it TWICE (and I refreshed the page to make sure) and so I added it to the Answer section.  THEN my reply appears  :(
    8,210 pointsBadges:
    report
  • hunshabbir7
    Thanks BigKat, I have done in both ways passing as numeric and as date data type and it works great.

    1,580 pointsBadges:
    report
  • BigKat
    :)  Glad I could help!  Happy Coding!
    8,210 pointsBadges:
    report
  • BigKat
    @rpgprogrammer2003

    When you add to an answer, please be careful not to delete other information that is already there.  :)  
    8,210 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following