IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FUNCTION INTEGER-OF-DATE giving error


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dham.kamal

New User


Joined: 13 Jul 2007
Posts: 9
Location: India

PostPosted: Mon Jul 16, 2007 10:46 am
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jul 16, 2007 12:39 pm
Reply with quote

On your listing, the heading describes which COBOL you are using and what version, release and level. What does it show?
Back to top
View user's profile Send private message
dham.kamal

New User


Joined: 13 Jul 2007
Posts: 9
Location: India

PostPosted: Mon Jul 16, 2007 12:42 pm
Reply with quote

PP 5668-958 IBM VS COBOL II Release 3.2 09/05/90
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jul 16, 2007 1:12 pm
Reply with quote

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
View user's profile Send private message
dham.kamal

New User


Joined: 13 Jul 2007
Posts: 9
Location: India

PostPosted: Mon Jul 16, 2007 2:16 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jul 16, 2007 2:31 pm
Reply with quote

What manual did you use to search around the LE functions?
Back to top
View user's profile Send private message
dham.kamal

New User


Joined: 13 Jul 2007
Posts: 9
Location: India

PostPosted: Mon Jul 16, 2007 5:08 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jul 16, 2007 6:43 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top