IBMiAccess




Results 1 to 9 of 9

Thread: Maximum value using move

  1. #1
    Code400 Newbie
    Join Date
    Aug 2007
    Location
    M閤ico
    Posts
    30
    Rep Power
    566

    Maximum value using move

    Hello,

    I want to do something like this:

    MOVE '0000000000000000' MYFIELD

    But the Move command only lets me write '00000000'... how can i do this?

  2. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

  3. #2
    Programmer/Analyst I bryce4president's Avatar
    Join Date
    Apr 2007
    Location
    Lewisburg, PA
    Age
    31
    Posts
    2,895
    Rep Power
    4662

    Re: Maximum value using move

    are you just going to move all zeros? if so then you can do this...

    MOVE *ZEROS MYFIELD


    you can also do this...

    EVAL MYFIELD = 'STRING TEXT HERE'

    or

    EVAL MYFIELD = *ZEROS
    Your future President
    Bryce

    ---------------------------------------------
    http://www.bravobryce.com

  4. #3
    Code400 Newbie
    Join Date
    Aug 2007
    Location
    M閤ico
    Posts
    30
    Rep Power
    566

    Re: Maximum value using move

    Thanks, can i use EVAL eventhough my rpg program is an RPG III ?

    I will use zeros for one field and '999999999' for another one.

  5. #4
    Driver of cars, eater of food jamief's Avatar
    Join Date
    Jan 2004
    Location
    Belvidere, IL - United States of America
    Age
    49
    Posts
    9,429
    Rep Power
    12629

    Re: Maximum value using move

    bigstring = *all'0';

    eval somefield = *HIVAL


    eval somefield = *LOVAL
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  6. #5
    Programmer/Analyst I bryce4president's Avatar
    Join Date
    Apr 2007
    Location
    Lewisburg, PA
    Age
    31
    Posts
    2,895
    Rep Power
    4662

    Re: Maximum value using move

    move *all'0' myfield


    I think that is right. its along the lines of what jamie is talkin about. but his won't work as is in RPG III. that is a /free way of doing it.

    I am correct right? /free is only ILE?
    Your future President
    Bryce

    ---------------------------------------------
    http://www.bravobryce.com

  7. #6
    Code400 Newbie
    Join Date
    Aug 2007
    Location
    M閤ico
    Posts
    30
    Rep Power
    566

    Re: Maximum value using move

    Ok, yes, JaimieF replies are for RPG ILE... the one from you Bryce is adecuated to RPG III, thanks a lot to both for the quick response!

  8. #7
    Experienced Forum Member arrow483's Avatar
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    1,743
    Rep Power
    4231

    Re: Maximum value using move

    Quote Originally Posted by bryce4president View Post
    move *all'0' myfield


    I think that is right. its along the lines of what jamie is talkin about. but his won't work as is in RPG III. that is a /free way of doing it.

    I am correct right? /free is only ILE?
    You are correct that /free is only allowed in RPG-IV (aka RPG-ILE). However, the MOVE command will work in fixed-format. MOVE is not allowed in free-format

  9. #8
    Programmer/Analyst I bryce4president's Avatar
    Join Date
    Apr 2007
    Location
    Lewisburg, PA
    Age
    31
    Posts
    2,895
    Rep Power
    4662

    Re: Maximum value using move

    good to know. i think i want to start programming in free, but the other two guys in the office only code in fixed format, and the one will NEVER change.
    Your future President
    Bryce

    ---------------------------------------------
    http://www.bravobryce.com

  10. #9
    Noffascropulan gcraill's Avatar
    Join Date
    Mar 2006
    Location
    Hamilton
    Age
    47
    Posts
    1,552
    Rep Power
    3461

    Re: Maximum value using move

    Quote Originally Posted by bryce4president View Post
    good to know. i think i want to start programming in free, but the other two guys in the office only code in fixed format, and the one will NEVER change.
    Just tell your co-workers that America is the "Land of the Free" and if they still ague ask to see their green cards

    GC

  11. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Age
    21
    Posts
    1,000,000
     

Facebook Comments


Similar Threads

  1. Gone Wrong somewhere....
    By bryce4president in forum RPG/RPGLE
    Replies: 6
    Last Post: August 30th, 2007, 06:37 AM
  2. SETGT and CHAIN
    By bryce4president in forum RPG/RPGLE
    Replies: 8
    Last Post: July 19th, 2007, 07:32 PM
  3. No Member In Logical File
    By ruma in forum DDS
    Replies: 31
    Last Post: July 4th, 2007, 11:00 PM
  4. Incorrect relative record number error
    By Renee in forum RPG/RPGLE
    Replies: 6
    Last Post: March 22nd, 2007, 09:27 PM
  5. logic
    By john in forum RPG/RPGLE
    Replies: 13
    Last Post: March 15th, 2006, 11:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •