Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

FUNCTION INTEGER-OF-DATE giving error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: FUNCTION INTEGER-OF-DATE giving error
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: 3158
Location: Tucson AZ

PostPosted: Mon Jul 16, 2007 12:39 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Jul 16, 2007 1:12 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Jul 16, 2007 2:31 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Jul 16, 2007 6:43 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us