View previous topic :: View next topic
|
Author |
Message |
zatlas Currently Banned New User
Joined: 07 Dec 2006 Posts: 8 Location: Ne Jersey
|
|
|
|
Hi All
I have an Assembler program that does LINK EP... and refer to a system utility (IDCAMS)
I coded an equivalent COBOL program that does:
01 VAR PIC X(8).
.
.
MOVE 'IDCAMS' TO VAR
CALL VAR
I even added the SYS1.LINKLIB (where IDCAMS resides) to the STEPLIB. The program abends on S806 because it may not find IDCAMS.
Any clues please. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Try CALL 'IDCAMS ' making the call static rather than dynamic. You won't want to keep that executable, but you could see if it will run.
Please post your jcl for that step and for the assembler step that works.
If i recall there are multiple reasons for an 806 - one of them is module not found, but i believe that is not the only reason. Again, from memory, i believe the 806-4 is module not found.
Good luck and keep us posted. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you have an assembler module that successfully makes the call, you could maybe strip the assembler down so that all that it did was call IDCAMS - then call your new assembler module from your COBOL code.
Just a thought - not even a suggestion really.
Good luck and keep us posted. |
|
Back to top |
|
|
zatlas Currently Banned New User
Joined: 07 Dec 2006 Posts: 8 Location: Ne Jersey
|
|
|
|
Thanks for the answers.
Mr. Thompson, it seems like you are correct and there is no real way to do that in COBOL although I am not sure why. Why would I need to LOAD or FETCH the program prior to CALLing it?
Is there an LE facility similar to the LOAD/FETCH that might be used from COBOL and thus help me? (this is a client project and I have to finish it ASAP!)
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Needing to LOAD or FETCH may have something to do with how IDCAMS is written.
Did you try to "nest" the call - from COBOL to assembler to IDCAMS? Curious if it helped, failed the same way or found some new abend. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I am sorry, if I can't recall fully, but there are IBM utilities that have "back door" entrances that are used by calling programs. I did not see it in the link I posted, but I can't get the thought out of my head that IDCAMS functionality is obtainable through some I-something-something module by a well-written COBOL program.
I will think about this some more and post IF and when I come up with anything.
Bill |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello again,
Here's a link that shows COBOL code that calls IDCAMS.
www.naspa.com/PDF/2000/0100%20TS%20PDFs/T0001006.pdf
Here's a quote from someone who tried it. . .
Quote: |
I was able to call IDCAMS from a COBOL program, as described in the PDF File (from naspa.com). Initially I got S0C4 Abend, because I missed DATA(24) Compiler Option. Later I succeeded and was able to store the output in a file specified in SYSPRINT. That PDF file explains the method in detail.
|
Give it a shot and we'll keep looking.
Good Luck! |
|
Back to top |
|
|
zatlas Currently Banned New User
Joined: 07 Dec 2006 Posts: 8 Location: Ne Jersey
|
|
|
|
Thanks so much. It helps!
One question (because my mind is already overwhelmed :-) Is there any validity to AMODE24 with DATA31 or would AMODE24 actually force DATA24 as well regardless to what I say? |
|
Back to top |
|
|
|