Cobol calls Assembler subroutine Cobol calls Assembler subroutine mani05 (Programmer) (OP) 22 Jul 09 11:22 Hi, Please anyone help me to understand how cobol pass values to assembler subroutine and it gets back.I am looking for manual also. RE: Cobol calls Assembler subroutine webrabbit (MIS) 22 Jul 09 12:04 Please post O/S and COBOL vendor and version. And are you working with the COBOL source or the assembler source? RE: Cobol calls Assembler subroutine mani05 (Programmer) (OP) 23 Jul 09 02:30 Hi, I am using XP2000.I am working in IBM COBOL.The assembler subroutine is already there,i want to modify something in that assembler subroutine.So i am trying to understand the process how cobol calls assembler,how it pass the value and it gets back. RE: Cobol calls Assembler subroutine webrabbit (MIS) 23 Jul 09 11:06 I am not familliar with XP2000. Is this an IBM mainframe? RE: Cobol calls Assembler subroutine mikrom (Programmer) 23 Jul 09 12:28 Or do you mean Windows XP/2000 ? RE: Cobol calls Assembler subroutine papadba (MIS) 23 Jul 09 15:57 And which "IBM COBOL"? RE: Cobol calls Assembler subroutine mani05 (Programmer) (OP) 24 Jul 09 01:53 I mentioned Windows XP/2000,i am working on COBOL-85. RE: Cobol calls Assembler subroutine Glenn9999 (Programmer) 24 Jul 09 02:48 RM COBOL-85...anyway this concept isn't much different compared to what your caller is, for all subroutines use these.Variables are passed either by value or by reference. This is probably what you will be most concerned with. The COBOL calling program will need to match the subroutine in how it is called.A "By Value" reference is copied to an internal reference in the function. If it's not set as a constant, it can be changed, but changes will not be reflected outside of the function.A "By Reference" reference is passed via pointer reference. It can be changed, and the change will be reflected in the main program after the call.There are also many other methods regarding the order/way parameters are passed to subroutines. You will need to match this in the subroutine with how RM-COBOL handles things. But with the way your post reads, you are modifying and not creating, so this should not be a concern for you. Measurement is not management. RE: Cobol calls Assembler subroutine jmanj (Programmer) 24 Jul 09 11:20 manni05, It's been a long time since I have done this but your problem brings back some memories. Yes I did something like this a long time ago. Cobol calling assembler or RPG and vice versa.I think your problem here can be summarized as:1. Understanding the linkage between program languages. This is a big topic because you have to understand how data is shared. Just like Glenn said data can be passed by reference, value and also by content, either statically or dynamically.2. Know how the parameters are being passed and received and the structures of the parameters. Know what is the common area being used by both program (sometimes they called it data areas).3. If you are going to change something in assembler then do it in assembler and not in cobol. If you are going to change the structure of a parameter then you will have to do it in both programs because they need to match or you will get errors.Hope this helps.