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

CObol :Function interger of date


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed Nov 24, 2010 4:07 pm
Reply with quote

Hi i am using below function

Date1 defination pIC 9(08).
Date2 defination pIC 9(08).

MOVE FUNCTION INTEGER-OF-DATE(date1)
TO date2.

When i compile the program

Numeric function "INTEGER FUNCTION INTEGER-OF-DATE" was not allowed in this context. The statement was discarded.

Kindly let me know how can it be resolved for above Move statement
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Nov 24, 2010 4:19 pm
Reply with quote

It must be used as part of an arithmetic expression. EG:

Code:

03  WS-INTEGER-OF-DATE PIC S9(09) COMP-3.

MOVE 20101124 TO DATE1.
COMPUTE WS-INTEGER-OF-DATE = FUNCTION INTEGER-OF-DATE (DATE1).

This is clearly documented in the IBM documentation, so for future reference as well as avoid being flamed, may I suggest -

www.ibmmainframes.com/manuals.php

OR -

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/library

Thank you for your support....

Bill
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed Nov 24, 2010 4:27 pm
Reply with quote

thanks bill.
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 Replace each space in cobol string wi... COBOL Programming 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top