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 Current-date - error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: function Current-date - error
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 21, 2008 7:06 pm    Post subject: Re: function Current-date - error
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 21, 2008 7:37 pm    Post subject: Re: function Current-date - error
Reply with quote

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

http://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    Post subject:
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Aug 22, 2008 8:01 pm    Post subject: Re: function Current-date - error
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    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