Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2504
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: 2504
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: 2504
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 3270 Data stream error Benchwarmer CICS 6 Tue Apr 17, 2018 12:06 am
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts IMS error U4038 while executing my PL... abdulrafi IMS DB/DC 2 Thu Feb 08, 2018 1:05 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us