Free format subdur minutes from a time

15 pts.
Tags:
Free form syntax
RPG
RPG Code
SUBDUR
I am trying to search for the correct syntax for subtracting a minute from a time.

I have a 6 numeric time field in HHMMSS format.  I am trying to use free format to subtract a minute.  Having trouble.

Using:

@atime=%dec((%time(@atime:*hms)- 1 *min) :6:0)                                   

Getting compile error saying "The name or indicator minis not defined"  tried *mm, *m. 

 tried -%min(1)  says "token is not valid"

I can't find an example of this code.  any help would be appreciated



Software/Hardware used:
rpg free
ASKED: May 2, 2011  6:39 PM
UPDATED: May 4, 2011  7:03 PM

Answer Wiki

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

Discuss This Question: 3  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
  • TomLiotta
    Try this:
    /free
       @atime=%dec((%time(@atime:*hms)- %minutes(1) ) ) ;
    /end-free
    Tom
    125,585 pointsBadges:
    report
  • VictoriaS
    thanks that worked!
    15 pointsBadges:
    report
  • TomLiotta
    You're welcome. I hope that comparing the code to the reference manual can provide some clarity to IBM's documentation. Sometimes seeing an example explains details that haven't quite clicked yet. Tom
    125,585 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