|
Let me reformat your question. I will rename your fields as to
not confuse anyone with the built in function %status.
I have a field named Y, and Y has a value of 'Hello'. Can I set
X equal to whatever currently is in Y? For example if I set X=Y
and then change the value of Y from 'Hello' to 'World' will X now
have the value of 'World'? Yes you can. This is how.
D Y S 5A inz('Hello')
D YPointer S * inz(%addr(Y))
D X S 5A based(YPointer)
C X dsply
C Y dsply
C eval X='World'
C Y dsply
C eval *inlr=*on
This technique is commonly used to pass a datastructure as a
parameter. Instead of moving a data structure to a variable and then
passing that variable and then moving that variable back to the data
structure upon return. Wow, thank you for the question. I just
thought of a use for this technique!
Vini.Kolathur@msasaro.com on 04/13/2000 10:29:30 AM
Please respond to RPG400-L@midrange.com@Internet
To: RPG400-L@midrange.com@Internet
cc:
Fax to:
Subject: Field value
Hi ,
Just wanted to make sure if this is possible in RPG/400 or ILE. Can
i treat the value of a field as a field and do a comparison operation.
For eg: Field X= "STATUS" , this STATUS is the name of field using
this can i access the value of the field STATUS.
I guess i am clear in my question .
Can somebody help me with it.
Thank you,
Vini
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.