View previous topic :: View next topic
|
Author |
Message |
angt
New User
Joined: 01 Jun 2005 Posts: 17 Location: USA
|
|
|
|
Hi
I am trying to use STORAGE function of rexx to override a value at given adress but it is returning null string all the times.
Storage(address,,data) , when i remove data from the function it returns first byte at that place but as soon as i put data it returns null string
Please enlightem me if you have any idea about it
thanks
Anurag |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
It will probably help if you post the code. Please use the "Code" tag on the Reply panel.
When you have a question, please start a new topic for your question rather than posting a reply to some inactive topic. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Are you trying to update protected storage ? |
|
Back to top |
|
|
angt
New User
Joined: 01 Jun 2005 Posts: 17 Location: USA
|
|
|
|
Here is the code
Code: |
/* REXX GETRC */
NUMERIC DIGITS(32) /*ENSURE MAX PRECISION*/
TCB = PTR(540,4)
TIOT= PTR(TCB+12,4)
JNAM= STG(TIOT,8)
SAY 'JOB NAME:' JNAM
TRACE I
JNAM1 = STG(TIOT,,'ABCDEFG')
JNAM1 = STG(TIOT,8)
SAY 'JOB NAME:' JNAM ' ' JNAM1
EXIT(0)
TRACE OFF
PTR: RETURN C2D(STORAGE(D2X(ARG(1)),ARG(2)))
STG: RETURN STORAGE(D2X(ARG(1)),ARG(2),ARG(3)) |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I think that you will find that only APF authorised programs, which are usually under the control of the sysprogs and closely monitored by the security people, are allowed to update storage in flight.
That is what I found out when trying to update a storage location with REXX myself. |
|
Back to top |
|
|
angt
New User
Joined: 01 Jun 2005 Posts: 17 Location: USA
|
|
|
|
Thanks Expat,
Can you show me some other examples where I can check that storage works
angt |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Not that I know of. Updating storage on the fly isn't really part of my job function, and I only tried it out a few times when there was nothing much else to do.
The function quite happily retrieves data from the given location, but does not update it.
Might have a play with the SAS equivilent of PEEK and POKE, but then again that all depends on time availability. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
<good Pedro>
You should just submit the job with a correct name! Why would you want to change the name after submitting? You cannot update system control blocks, but should be able to update your private storage.
You can use IPCS to find control blocks in your private storage. And given the addresses, use STORAGE to change it from rexx.
</good Pedro>
<evil Pedro>
You might be able to zap system storage using the TESTAUTH command. But you can easily corrupt system storage, so I do not recommend it. When they find out who crashed the system, they will be upset. TESTAUTH is usually protected from casual use.
</evil Pedro> |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But you can easily corrupt system storage, so I do not recommend it. When they find out who crashed the system, they will be upset. |
Unless you have direction from your management you should not even attempt it.
Some places i've supported find this sort of "tinkering" grounds for termination. It is very likely that there is no business requirement to do this. Learning is one thing, this is more like sabotage/subtrefuge. |
|
Back to top |
|
|
angt
New User
Joined: 01 Jun 2005 Posts: 17 Location: USA
|
|
|
|
Thanks All for your views
Pedro what is IPCS ? |
|
Back to top |
|
|
angt
New User
Joined: 01 Jun 2005 Posts: 17 Location: USA
|
|
|
|
angt wrote: |
Thanks All for your views
Pedro what is IPCS ? |
I got some thing like Interactive Problem Control Fclty but I am not sure how to get control blocks in my private storage |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
I suggest your application allocate a control block that includes a character field; perhaps some 8 or 16 character value that should be unique to your application. Many system control blocks typically have an 'ID' field for this purpose.
Then use IPCS to search through storage looking for your 'eyecatcher'. Then you will have the address of your control block. This is sort of a brainstorm session. I have not used IPCS in this fashion, but only surmise that it is possible. |
|
Back to top |
|
|
|