| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
PriyaSubramanian
Joined: 27 May 2008
Posts: 12
Location: Bangalore
|
| Posted: Thu Aug 21, 2008 6:32 pm Post subject: function Current-date - error |
|
|
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 |
|
Bill O'Boyle
Joined: 14 Jan 2008
Posts: 345
Location: Orlando, FL, USA
|
| Posted: Thu Aug 21, 2008 7:06 pm Post subject: Re: function Current-date - error |
|
|
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 |
|
PriyaSubramanian
Joined: 27 May 2008
Posts: 12
Location: Bangalore
|
| Posted: Thu Aug 21, 2008 7:14 pm Post subject: |
|
|
| Can you help me with code struct? |
|
| Back to top |
|
Bill O'Boyle
Joined: 14 Jan 2008
Posts: 345
Location: Orlando, FL, USA
|
| Posted: Thu Aug 21, 2008 7:37 pm Post subject: Re: function Current-date - error |
|
|
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. :wink:
Bill |
|
| Back to top |
|
PriyaSubramanian
Joined: 27 May 2008
Posts: 12
Location: Bangalore
|
| Posted: Thu Aug 21, 2008 7:41 pm Post subject: |
|
|
Thanks for your help.
will check with this.
:) |
|
| Back to top |
|
PriyaSubramanian
Joined: 27 May 2008
Posts: 12
Location: Bangalore
|
| Posted: Fri Aug 22, 2008 7:28 pm Post subject: |
|
|
USING CEEIGZCT FUNCTION ALSO DOESNT HELP ME TO RETRIEVE THE CURRENT DATE.
CAN ANYONE HELP ME INTHIS ? |
|
| Back to top |
|
Bill O'Boyle
Joined: 14 Jan 2008
Posts: 345
Location: Orlando, FL, USA
|
| Posted: Fri Aug 22, 2008 8:01 pm Post subject: Re: function Current-date - error |
|
|
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 |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|