Page 1 of 1

using GETMAINs across programs w/ SET ADDRESS OFs

PostPosted: Thu Oct 02, 2014 9:01 pm
by paulmac1968
Simple question.....

Can I do a GETMAIN in program A, pass the pointer via linkage to program B and then in program B do a SET ADDRESS OF MY-FIELD TO PTR-FROM-PGM-A? I've seen plenty of examples of where it's all done in one program, but not across two. I'm thinking it shouldn't be an issue.

Thx.

Paul Mac

Re: using GETMAINs across programs w/ SET ADDRESS OFs

PostPosted: Thu Oct 02, 2014 9:36 pm
by BillyBoyo
Yep, should be unproblematic.

Re: using GETMAINs across programs w/ SET ADDRESS OFs

PostPosted: Wed Feb 10, 2021 2:53 pm
by Daniel9999
You, you can. It the program is not in the same region you must use GETMAIN SHARED
bye

Re: using GETMAINs across programs w/ SET ADDRESS OFs

PostPosted: Wed Feb 10, 2021 3:42 pm
by enrico-sorichetti
please stop resurrecting old and concluded topics