View previous topic :: View next topic
|
Author |
Message |
subratarec
Active User
Joined: 22 Dec 2007 Posts: 130 Location: Bangalore
|
|
|
|
Hi Team,
Pardon my ignorance, I have very little idea about COBOL's User Defined Function feature which was introduced by IBM in 6.4 version of COBOL.
In my shop, Infra-team recently installed the COBOL 6.4 version, and want to know about this User Defined Function. Does anyone know about it or has already implemented or tested it? If Yes, then if you can share a small example of the setup then it would be great.. I have checked the IBM documentation but it's not very clear to me. so looking for someone who already tested it.
My understanding is, that I can write a small function code in a stand-alone compilation unit and then write another main module (as a separate compilation unit) and call the function from there... kind of same like we call sub-programs dynamically in COBOL. But I may be wrong..
So need some idea..
Thanks,
Subrata |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
subratarec
Active User
Joined: 22 Dec 2007 Posts: 130 Location: Bangalore
|
|
|
|
Hi Enrico,
Thanks for your reply. Yes I checking those 2 links and tried with IBM shown examples also. Something is not right (Obviously at my end) and compilation itself is failing (when I am trying to compile the Function modules separately).
I will try again and will see. If I fail, I will come back to the same thread with all the details..
Thanks |
|
Back to top |
|
|
subratarec
Active User
Joined: 22 Dec 2007 Posts: 130 Location: Bangalore
|
|
|
|
Update...
I tried to compile and run IBM-given sample examples. Seems the compilation itself is failing. From what I saw, the compiler is not able to recognize the FUNCTION keyword (Though we have now COBOL 6.4). I am Getting SOC1 abend.
In discussion with the support team to identify the issue. Not sure if any special compiler option or setup needs to be done.
Thanks |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
re: I am Getting SOC1 abend
Can you clarify? Is the compiler getting 0C1 or are you trying to run the program anyway after the compile failed? |
|
Back to top |
|
|
subratarec
Active User
Joined: 22 Dec 2007 Posts: 130 Location: Bangalore
|
|
|
|
Hi Pedro,
Is the compiler getting 0C1 - This is correct. Weird but it is happening. So I gave the post. Because it is new to me (user-defined function) I wanted to get someone's experience if they have already used it.
Still working with the IT team on this. The basic compilation itself is not happening.
Thanks |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
subratarec wrote: |
Is the compiler getting 0C1 - This is correct. Weird but it is happening. |
Highly likely, the input dataset with the source code has wrong format?
Any other wrong DD statement may give such result, too.
It is a very bad idea - to start here a theoretical research: what might happen?
Please, present here THE FULL CODE (JCL compile, or whatever) which has failed, plus ALL AVAILABLE LOGS AND MESSAGES.
Did you try to start your compilation from a simple "HELLO, WORLD!" program?!
After that, you can start adding real parts of your code, one by one, until "your compilation fails again"
P.S.
Do not forget to use the Code button to emphasize your code! |
|
Back to top |
|
|
|