Can I move a data structue(along with positional-values) into a Data area of same length.

620 pts.
Tags:
AS/400
RPG/400
Can I move a data structue(along with positional-values) into a Data area of same length. Can I move a data structue having positional-values exactly into the same positions of the data area. my code is as follows:- 0014.00 FCS86C00 CF E WORKSTN 0015.00 * 0016.00 I@DS001 DS 452 0017.00 I 1 256 @DTA 0018.00 I 38 41 @CBUS 0019.00 I 100 100 @ABVD 0020.00 I 101 101 @LGHC 0021.00 I 102 102 @LEFI 0022.00 I 103 137 @GHC1 0023.00 I 138 172 @GHC2 0024.00 I 173 207 @GHC3 0025.00 I 208 242 @GHC4 0026.00 I 243 277 @GHC5 0027.00 I 278 312 @GHC6 0028.00 I 313 347 @GHC7 0029.00 I 348 382 @GHC8 0030.00 I 383 417 @GHC9 0031.00 I 418 452 @GHC0 now iam getting the data into the above DS as follows:- 0101.00 C *NAMVAR DEFN GCC00100 @DS001 0102.00 C IN @DS001 Initially there are some values(positions 1 -256) in the data area which i get into the DS as above. Now can i move the datastructure with updated values(I build all the other values till position 452 of DS in my program) back to data area using C OUT @DS001 Thanks for your help, Svanky

Software/Hardware used:
AS/400

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: 5  Replies

 
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
  • CharlieBrowne
    Yes, just as you used IN to get the data area contents, use OUT to update the data area. If you are not familiar to how this is done, see the RPG Reference manual.
    41,380 pointsBadges:
    report
  • svankipu
    Hi Charlie! Thank You! very much for your reply-post. one more query... Is it mandatory to use "UNLCK"(Unlock) opcode, after updating the data area? OR just using OUT DATAAREA is enough?
    620 pointsBadges:
    report
  • TomLiotta
    And be sure to use the old RPG/400 Reference because this is very old code. . Is there a reason you need *NAMVAR DEFN with IN and OUT, instead of just using GCC00100 in the first place? (And is there a reason you're using such old code? The documentation hasn't even been updated in the last two OS versions.) . Tom
    125,585 pointsBadges:
    report
  • svankipu
    Hi Tom! you have very rightly said as to why to use an old programming(viz., RPG III), I can understand the frustration with it. Given a choice, even I would like to go for RPGILE. but Iam helpless, as Iam changing an old program written way back in 2001, to add some more fields & validations to it. The client will not accept for the change in the language altogether. I don't have a choice. However thanks a lot guys!, for your patience & prompt replies.Really appreciate them. Thank you!
    620 pointsBadges:
    report
  • TomLiotta
    In 2001, the coding was already old and out of date. But today it needs to be converted soon. Tools such as SEU have already been stabilized and will not support new language features that have been added since i 6.1. And the old compilers have become a separate extra charge in i 6.1. . To provide your client best service value, you should make sure that your client knows they may be headed for some unexpected charges for upcoming system upgrades. . That's separate from simply losing programmers who were familiar with the language due to retirements. And that includes IBM developers if support is needed. (Not to mention people like us trying to remember how things used to work.) . But again, is there a reason you don't simply use the automatic support? You shouldn't need to use the IN and OUT operation codes if you're getting the original data area values and updating it. The program can get the data area automatically when it starts and and write the data area when it ends. Any changes your program makes will be stored automatically if that's what you want. It might not be necessary to use *NAMVAR DEFN at all. . 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