View previous topic :: View next topic
|
Author |
Message |
dham.kamal
New User
Joined: 13 Jul 2007 Posts: 9 Location: India
|
|
|
|
Hi
I have coded following steps.
COMPUTE DATE-DAY = FUNCTION INTEGER-OF-DATE (CURR-DATE).
SUBTRACT 1 FROM DATE-DAY.
COMPUTE TRADE-DATE = FUNCTION DATE-OF-INTEGER (DATE-DAY).
here i need to subtract 1 day form the current date.
When i compile this code its gives me an error saying
""FUNCTION" was not defined as a data-name".
Can you tel me the reason why is it so.
thanks
Kamal |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
On your listing, the heading describes which COBOL you are using and what version, release and level. What does it show? |
|
Back to top |
|
|
dham.kamal
New User
Joined: 13 Jul 2007 Posts: 9 Location: India
|
|
|
|
PP 5668-958 IBM VS COBOL II Release 3.2 09/05/90 |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
That's what I thought....Way back level and VS COBOL II has no intrinsic functions.
IIRC, there are LE functions that do what you want...... |
|
Back to top |
|
|
dham.kamal
New User
Joined: 13 Jul 2007 Posts: 9 Location: India
|
|
|
|
yeah..i also searched around for ZLE functions..
i want 1 for convert date into an Integer
and another 1 for converting that interger back to date
the date is in CCYYMMDD format |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What manual did you use to search around the LE functions? |
|
Back to top |
|
|
dham.kamal
New User
Joined: 13 Jul 2007 Posts: 9 Location: India
|
|
|
|
i got this document
'http://www-03.ibm.com/servers/eserver/zseries/zos/le/conference/pdf/ny8243.pdf'
which tells about many services.
but it doesnt contain service for converting interger back to date.
CEECBLDY i got which converts date to integer. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Thanks for the pointer, in the summary was:
Details on callable services available in the Language Environment programming Reference. (SA22-7562-03).
Using that and searching IBM, I got:
z/OS V1R4.0 Language Environment Programming Reference.
Chapter 1, Language Environment quick reference tables, has a section, Date and time callable services, which has table 5, Date and Time Callable Services which should help. |
|
Back to top |
|
|
|