Skip to main content

[archive] Passing data

  • September 10, 2009
  • 5 replies
  • 0 views

[Migrated content. Thread originally posted on 10 September 2009]

Hello
Is there a way to pass data from a "called" program to the "calling" program?

Thanks

5 replies

[Migrated content. Thread originally posted on 10 September 2009]

Hello
Is there a way to pass data from a "called" program to the "calling" program?

Thanks
Well if the original program does not have linkage defined for the items you want to pass back, you could have the "called" program put the data ouyt as external and then have the "calling" program look for the external data. You could do a similar thing using files, "called" program outputs "newdata" file and then called program reads in "newdata" file.

[Migrated content. Thread originally posted on 10 September 2009]

Hello
Is there a way to pass data from a "called" program to the "calling" program?

Thanks
Well if the original program does not have linkage defined for the items you want to pass back, you could have the "called" program put the data ouyt as external and then have the "calling" program look for the external data. You could do a similar thing using files, "called" program outputs "newdata" file and then called program reads in "newdata" file.

[Migrated content. Thread originally posted on 10 September 2009]

Hello
Is there a way to pass data from a "called" program to the "calling" program?

Thanks
Well if the original program does not have linkage defined for the items you want to pass back, you could have the "called" program put the data ouyt as external and then have the "calling" program look for the external data. You could do a similar thing using files, "called" program outputs "newdata" file and then called program reads in "newdata" file.

[Migrated content. Thread originally posted on 10 September 2009]

Hello
Is there a way to pass data from a "called" program to the "calling" program?

Thanks
Thanks, Dilbert
Can you do it with linkage?
With us it doesn't seem to work. We can pass data to the "called" program but not back to the "calling" program.

[Migrated content. Thread originally posted on 10 September 2009]

Hello
Is there a way to pass data from a "called" program to the "calling" program?

Thanks
You should be able to do this with linkage. Calling program
01 my-data
03 data-a pic x(10)
03 data-b pic x(10)
03 data-c pic x(10)

Let's say you send data to called program and use data-a and data-b, the called program needs have the procedure division using all three even though no data is coming in on data-c. Now the called program can place data where it corresponds to data-c. The calling program should get back the data in data-c.