View previous topic :: View next topic
|
Author |
Message |
PriyaSubramanian
New User
Joined: 27 May 2008 Posts: 12 Location: Bangalore
|
|
|
|
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
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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
New User
Joined: 27 May 2008 Posts: 12 Location: Bangalore
|
|
|
|
Can you help me with code struct? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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.
Bill |
|
Back to top |
|
|
PriyaSubramanian
New User
Joined: 27 May 2008 Posts: 12 Location: Bangalore
|
|
|
|
Thanks for your help.
will check with this.
|
|
Back to top |
|
|
PriyaSubramanian
New User
Joined: 27 May 2008 Posts: 12 Location: Bangalore
|
|
|
|
USING CEEIGZCT FUNCTION ALSO DOESNT HELP ME TO RETRIEVE THE CURRENT DATE.
CAN ANYONE HELP ME INTHIS ? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
|