Forced Date Routine Processing

5 pts.
Tags:
COBOL
EXEC
Programming
SELECT
I’m trying to process a RUNDATE = 2009-08-07 into my COBOL code via a PARM-DATE Link. That date comes in… now I try to place it in the following piece of code: EXEC SQL SET :WS-PREV-WK = CHAR(DATE(TMP-DATE)- 7 DAYS) END-EXEC. What am I getting '0001-01-01' returned?

Answer Wiki

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

Why not do the date manipulation using the COBOL / CBLLE code only?

01 ISO-TODAY
FORMAT DATE “@Y-%m-%d”.

01 ISO-LAST-WEEK
FORMAT DATE “@Y-%m-%d”.

MOVE FUNCTION SUBTRACT-DURATION
( ISO-TODAY DAYS 7 ) TO ISO-LAST-WEEK.

Discuss This Question:  

 
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

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