The OPSTORE function returns a character string of the specified length containing a copy of the virtual storage at the specified address.
At present, the only func value supported is S for Storage.
Note: The OPSTORE function can be used in OPS/REXX or AOF rules.
This function has the following format:
var = OPSTORE(func,address,length)
Address may be any virtual storage address in the home address space. When a REXX program runs in an APF-authorized environment, all virtual storage locations in the home address space can be accessed. Under usual circumstances, only production (not test) AOF rules run as APF-authorized. However, CA OPS/MVS TSO command processors that have been added to the TSO authorization tables are an exception to this rule. When a REXX program running in a non-APF-authorized environment invokes the OPSTORE function to access fetch-protected storage, a zero-length result is returned.
The length argument can be any non-negative integer value up to 256 (inclusive). This specifies the length of the virtual storage data to be returned in the result character string.
Examples: OPSTORE
The following are examples of the OPSTORE function:
CVT=OPSTORE(S,'10'X,4) SAY C2X(CVT)
/* REXX */
parse source rexxtype .
if rexxtype == "OPS/REXX" then
do
CVT = OPSTORE("S",'10'x,4)
asvt = OPSTORE("S",D2C(C2D(CVT) + 556),4)
asvtnonr = C2D(OPSTORE("S",D2C(C2D(asvt) + 488),4))
asvtanr = C2D(OPSTORE("S",D2C(C2D(asvt) + 496),4))
end
else
do
CVT = C2D(STORAGE(10,4))
asvt = C2D(STORAGE(D2X(CVT + 556),4))
asvtnonr = C2D(STORAGE(D2X(asVT + 488),4))
asvtanr = C2D(STORAGE(D2X(asVT + 496),4))
end
say "asvtnonr = "asvtnonr
say "asvtanr = "asvtanr
result = asvtanr - asvtnonr
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |