Using pointers

15 pts.
Tags:
AS/400
AS/400 Fields
Pointers
I need to update a lot of fields in a record testing on an internal array if that field is "updatable". This should be: FILEFIELD001 = DSFIELD001  for each updatable field. I wonder if could be possible to use pointers to change values in a record and then update that record? In other words, instead of doing: CHAIN record + change fieldname = newvalue ....... + UPDATE Do: Change the bytes of the record starting from %addr + offset of the field to the same number of bytes from a DS (with the same method) and then update the record.
ASKED: May 13, 2013  9:53 AM
UPDATED: May 13, 2013  12:01 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    You'd still CHAIN and UPDATE; but as long as the fields are declared in a DS to ensure contiguous memory, there would be no problem doing it through a pointer. It's not clear why it would be a good idea, though. It would seem potentially slower as well as harder to understand and maintain. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following