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

function Current-date - error


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

New User


Joined: 27 May 2008
Posts: 12
Location: Bangalore

PostPosted: Thu Aug 21, 2008 6:32 pm
Reply with quote

MOVE FUNCTION CURRENT-DATE (1:14) TO WS-DATE
is giving error in compilation.
The error is 'FUNCTION" was not defined as a data-name'.
Can anyone tell me why this happens?
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: Thu Aug 21, 2008 7:06 pm
Reply with quote

COBOL "FUNCTIONS" were introduced with COBOL/370, about 15-17 years ago.

If your COBOL version/release is less than COBOL/370 (IE: COBOL2 or OS/VS COBOL) and this version/release is LE enabled, review the LE Callable Service routine "CEELOCT".

Bill
Back to top
View user's profile Send private message
PriyaSubramanian

New User


Joined: 27 May 2008
Posts: 12
Location: Bangalore

PostPosted: Thu Aug 21, 2008 7:14 pm
Reply with quote

Can you help me with code struct?
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: Thu Aug 21, 2008 7:37 pm
Reply with quote

Click on the below link, which includes a sub-link to an example.

publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/ceea3160/2.2.5.44?ACTION=MATCHES&REQUEST=CEELOCT&TYPE=FUZZY&SHELF=cee2bk60&DT=20050629120436&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
The calling structure for "CEELOCT" has been pretty-much standard for well over 15 years, so the above link should be applicable to your COBOL version/release.

However, keep in mind that it is recommended that COBOL FUNCTIONS used T/W their LE counterparts should not be mixed. It's either one or the other, not both, unless you use a particular compile-option, which ensures that both methods act in the same way.

IMHO, the LE Callable Service routines can be beneficial, in that they return a binary-halfword value in the 12-Byte Feedback parameter, which you can test for success, whereas, if you use an equvilent COBOL FUNCTION and you pass a bad-date, your program will abend.

Going forward, you need to perform this type of research on your own, because someday, all of us Dinosaurs will retire. icon_wink.gif

Bill
Back to top
View user's profile Send private message
PriyaSubramanian

New User


Joined: 27 May 2008
Posts: 12
Location: Bangalore

PostPosted: Thu Aug 21, 2008 7:41 pm
Reply with quote

Thanks for your help.
will check with this.
icon_smile.gif
Back to top
View user's profile Send private message
PriyaSubramanian

New User


Joined: 27 May 2008
Posts: 12
Location: Bangalore

PostPosted: Fri Aug 22, 2008 7:28 pm
Reply with quote

USING CEEIGZCT FUNCTION ALSO DOESNT HELP ME TO RETRIEVE THE CURRENT DATE.
CAN ANYONE HELP ME INTHIS ?
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: Fri Aug 22, 2008 8:01 pm
Reply with quote

IMHO, you need to consult with more senior colleagues in your shop in order to solve your dilemma, because several members have attempted to assist you on both of your posts, but to no avail.

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 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