Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADDRESS LINKMVS #102

Open
philmpv opened this issue Feb 24, 2022 · 2 comments
Open

ADDRESS LINKMVS #102

philmpv opened this issue Feb 24, 2022 · 2 comments

Comments

@philmpv
Copy link

philmpv commented Feb 24, 2022

I am trying to use ADDRESS LINKMVS to call object code and according to the official IBM documentation with regards to LINKMVS and ATTCHMVS, the rexx variables being used as parameters should be updated with any changes made in the called object module - quoted verbatim from the z/OS 2.4 documentation:

When the LINKMVS or ATTCHMVS environment routine regains control, it determines whether to update the values of the REXX variables before returning to the REXX exec. To determine whether to update the value of a variable for a specific parameter, the LINKMVS or ATTCHMVS environment checks the value in the halfword length field. Depending on the value in the length field, LINKMVS or ATTCHMVS updates the variable, does not update the variable, or sets the variable to the null string.
If the value in the length field is less than 0, the LINKMVS or ATTCHMVS environment does not update the variable for that parameter.
If the value in the length field is 0, the LINKMVS or ATTCHMVS environment sets the variable for that parameter to the null string.
If the value in the length field is greater than 0, the LINKMVS or ATTCHMVS environment updates the variable for that parameter with the value the program returned in the parameter list. If the length field is a positive number, LINKMVS or ATTCHMVS simply updates the variable using the length in the length field.
If the original length of the value is less than 500 bytes, TSO/E provides a storage area of 500 bytes regardless of the length of the value of the variable. For example, if the length of the value of the variable on entry to the program were 8 bytes, the halfword length field would contain the value 8. However, there are 500 bytes of storage available for the parameter itself. This allows the program to increase the length of the variable without having to obtain storage. If the invoked program changes the length of the variable, it must also update the length field.

If the original length of the value is 500 or more bytes, there is no additional space allotted. For example, suppose you specify a variable whose value has a length of 620 bytes. The invoked program can return a value with a maximum length of 620 bytes. TSO/E does not provide an additional buffer area. In this case, if you expect that the linked or attached program may want to return a larger value, pad the original value to the right with blanks.

Could you confirm if your version of the LINKMVS/ATTCHMVS environments do this ?

Many thanks.

@mgrossmann
Copy link

We are very sorry for missing your question. We don't update the REXX variable values, at the moment. Currently we are preparing our next relase of BREXX/370. So we are unable to fix this, today.

But we consider enhancing the ADDRESS LINK*** stuff accordingly.

@philmpv
Copy link
Author

philmpv commented Jan 26, 2024

I wish you all the best for the up coming release of this excellent Rexx interpreter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants