View previous topic :: View next topic
|
Author |
Message |
padmalaya89
New User
Joined: 15 Jul 2005 Posts: 8 Location: krishnagiri
|
|
|
|
how can you obtain the current date in cobol thanks oin advance |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi,
Accept identifier from date |
|
Back to top |
|
|
SBMF390
New User
Joined: 27 Jul 2006 Posts: 9
|
|
|
|
You can get the current date by
MOVE FUNCTION CURRENT-DATE(1:8) TO CURR-DATE. |
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi I would like to add one more point. I tried with so many options to display 4 digit year in my batch job. But I couldn't get. For that finally I got with the following code. What might be the reason we couldn't get without using the following logic.
WORKING-STORAGE SECTION.
01 CE-SYSTEM-DATE PIC X(08) VALUE SPACES.
01 CE-CURR-DATE PIC X(10) VALUE SPACES.
PROCEDURE DIVISION.
CALL 'IGZEDT4' USING BY REFERENCE CE-SYSTEM-DATE.
STRING CE-SYSTEM-DATE(5:2) '-'
CE-SYSTEM-DATE(7:2) '-'
CE-SYSTEM-DATE(1:4)
DELIMITED BY SIZE INTO CE-CURR-DATE.
DISPLAY 'CURRENT DATE IS:' CE-CURR-DATE.
Thanks!
Rathna. |
|
Back to top |
|
|
stly Warnings : 1 New User
Joined: 25 Jul 2005 Posts: 93
|
|
|
|
i think it will be easy if u code like this
EXEC SQL
SET :WS-CUR-TS = CURRENT DATE
END-EXEC.
and then the manipulations u require |
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
We are not using SQL. I want without using SQL.
Thanks!
Rathna. |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
use the misdate subroutine |
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi VIjayamadhuri, can you please let me know WHAT is MISDATE subroutine? B'cos I nere heard this word. Please elaborate for us.
Thanks!
Rathna. |
|
Back to top |
|
|
|