View previous topic :: View next topic |
Author |
Message |
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Jul 08, 2004 7:22 am Post subject: Invoke REXX from COBOL |
|
|
Hi,
Can someone provide me with a sample COBOL program to Invoke a REXX routine. (Just for example, lets assume my REXX just has a SAY 'Hi' COMMAND).
I tried to search for previous posts but couldn't find what I wanted .
Thanks, |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jul 08, 2004 7:52 am Post subject: |
|
|
OTOH, if you want ISPF services to be used, then you may want to look-up ISPLINK. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Jul 08, 2004 8:00 am Post subject: |
|
|
Kolusu,
Unfortunately our shop does not have the REXX compiler. Is it not possible to call REXX from COBOL at all?
I am not going to look for a ONLINE OUTPUT from REXX. Assume I have a REXX that does something in BATCH mode. Can this REXX be called by a COBOL program ?
Please guide me. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Jul 08, 2004 8:05 am Post subject: |
|
|
Cogito,
I don't have ISPF calls in my REXX.
Thanks, |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jul 08, 2004 8:11 am Post subject: |
|
|
Hmm. I was just guessing; because, I have not heard of such situations before.
Maybe, you can have the COBOL program in one step followed by the REXX program in the other step ? _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Jul 08, 2004 8:41 am Post subject: |
|
|
Cogito, This is mainly for privacy.
REXX will create a file dynamically and will call another program internally. The contents of the file should not be viewable to others.
If I call REXX in a separate step, the rexx source code could be traced easily and the contents of the file could be determined, but If I call REXX via COBOL program, then no one can know what REXX is being invoked since, all we have is the COBOL load module in the jcl.
Everyone should be able to submit the job but the contents of the file should be hidden.
Please guide me, |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jul 08, 2004 8:52 am Post subject: |
|
|
Quote: | REXX will create a file dynamically... |
Why not a temporary dataset?
Quote: | The contents of the file should not be viewable to others. |
Why not have a HLQ with proper RACF restrictions applied? Or, encrypt it using IDCAMS REPRPO.
Quote: | ...since, all we have is the COBOL load module in the jcl. | Not really. The AMBLIST utility will tell what CSECTs are available in the load module. Therefore, it is possible to find out, if REXX was used.
What is the purpose of creating the file that no-one will be able to view? Is it used anywhere else? If not, then you can load it to a DB2 table which is encrypted. This can be done easily by applying proper EDITPROC exits. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Jul 08, 2004 8:59 am Post subject: |
|
|
Phantom,
Quote: |
REXX will create a file dynamically and will call another program internally. The contents of the file should not be viewable to others. Everyone should be able to submit the job but the contents of the file should be hidden.
|
I am not sure what you mean viewable? Are you encrypting the data? or you just create the dataset with a different name for every run of the program?
Quote: |
but If I call REXX via COBOL program, then no one can know what REXX is being invoked since, all we have is the COBOL load module in the jcl.
|
hmm are you saying that no one can look at the cobol source?
btw if your sole intention is to dynamically create a file, then it is possible in COBOL itself with BPXWDYN and the JCL will not have file listed
Let me know if you are interested to a have an example program which dynamically allocates a file.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Jul 08, 2004 9:22 am Post subject: |
|
|
Kolusu,
This is really interesting. Please provide me some info regarding BPXWDYN. Yup, as you said the rexx routine will create a dataset with different name everytime.
Also, could you please provide me with some info on calling rexx via cobol (Just for learning purpose).
Thanks a ton.
Phantom |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Jul 08, 2004 9:36 am Post subject: |
|
|
Kolusu,
Quote: |
hmm are you saying that no one can look at the cobol source?
|
Is there a way to get back the cobol source code from the load module ? B'cas once compiled I can even save the source into a text file (out of the mainframe) and delete the code from the mainframe system (for security).
Thanks, |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Jul 08, 2004 9:54 am Post subject: |
|
|
Phantom,
Quote: |
Is there a way to get back the cobol source code from the load module ?
|
Well there are third-party tools which can recover the source for you. check these
http://www.source-recovery.com/
http://www.coboltools.com/Source-intro.htm
And if you are an expert with assembler , then you can decode the load module and generate the assembler instructions. Now with these assembler instructions , try to generate the equivalent cobol instructions. Not an impossible task, but a difficult one.
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Jul 08, 2004 10:17 am Post subject: |
|
|
Wow, thatz great Kolusu. If we can get back the source code back from load module, then we will miss the security completely. Is there any secured way for the problem ?
Thanks a lot....Unfortunately our shop has a firewall which doesnot allow us to browse FTP sites....(unable to browse the BPXWDYN site...)
I'm trying to search for this over the net. Meanwhile if you have some other HTTP sites please let me know.
Thanks a lot. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Jul 08, 2004 10:30 am Post subject: |
|
|
Phantom,
If your shop has QuickRef (QW) then you can simply type
Then you can use QPRINT to print the entire text. Search this forum for running QW in batch.
If your shop does not have Quickref , then I am opening another topic with the documentation.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|