Blog Archive

RPGLE for loop example - AS400 (iSeries)

Instead of a dowhile or a dountil you can now use a for loop just any other language in RPGLE.
The syntax of the FOR operation is as follows:
      FOR         index-name { = starting-value }
                  { BY increment-value }
                  { TO | DOWNTO limit-value }
         { loop body }
      ENDFOR | END

The starting-value, increment-value, and limit-value can be numeric values or expressions with zero decimal positions. The increment value, if specified, cannot be zero. The BY and TO (or DOWNTO) clauses can be specified in either order. Both "BY 2 TO 99" and "TO 99 BY 2" are allowed.

Example 1:
for i=1 by 1 to 100;
     //do something
endfor;

Example 2:
Extract all blank-delimited words from a sentence.
    WordCnt = 0;
    for i = 1 by WordIncr to %len (Sentence);
       // Is there a blank?
       if %subst(Sentence: i: 1) = ' ';
          WordIncr = 1;
          iter;
       endif;
        // We've found a word - determine its length
       for j = i+1 to %len(Sentence);
          if %subst (Sentence: j: 1) = ' ';
             leave;
          endif;
       endfor;
        // Store the word
       WordIncr = j - i;
       WordCnt = WordCnt + 1;
       Word (WordCnt) = %subst (Sentence: i: WordIncr);
    endfor;

Source: IBM Information Center

105 comments :

  1. Wonderful blog! This is very informative site. I am totally pleased by your excellent work. Many thanks for sharing.
    agario skins | mahjong connect | minecraft games |pac man | geometry dash lite | sniper games |halloween | game

    ReplyDelete
  2. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me
    Signature:
    i like play games happy wheels online and play happy wheels 2 games and friv , girlsgogames , games2girls

    ReplyDelete
  3. We thank you for sharing. If you feel tired because the work is too stressful or pressure from our study let's try this fascinating game offline. Thank you!
    return man 3
    Juegos de Matar Zombies
    return man 3
    return man 2
    return man
    return man 3 unblocked
    return man 3 hacked
    return man 3 zombies
    return man 3 the season
    return man 5
    return man 6

    ReplyDelete
  4. Thank you for sharing, I really enjoyed this. You can also participate in free games with our wonderful smell from it. Thank you !

    Juegos de Matar Zombies
    earn to die
    earn to die 2
    earn to die 3
    earn to die 4
    earn to die 2012
    earn to die 1
    earn to die part 2
    earn to die 6

    ReplyDelete
  5. Thanks for sharing the information. It is very useful for my future. keep sharing
    Geometry Dash 2.0 |Dr Driving | Trollface Quest 2 | Square Quick

    ReplyDelete
  6. This time I feel stressed, I go online to find the article to read. I happened to read your article, it's nice and emotional. I love it. descargar facebook , descargar facebook , baixar whatsapp , descargar whatsapp , baixar whatsapp plus , baixar mobogenie gratis , mobogenie

    ReplyDelete
  7. Great. This article is excellent. I have read many articles with this topic, but I have not liked. I think I have the same opinion with you. baixar facebook , baixar facebook , descargar facebook , descargar whatsapp gratis , descargar mobogenie gratis , baixar mobogenie gratis , messenger whatsapp

    ReplyDelete
  8. Thanks for your sharing. We feel very happy about that. You should also try my best to play our FREE today to get the sense of fun that brings. Thank you!
    return man 3
    return man 2
    return man

    ReplyDelete
  9. I wanted to thank you for this excellent read!! I definitely loved every little bit of it.Cheers for the info!!!! & This is the perfect blog for anyone who wants to know about this topic. I like play games Piano Tiles 2 game online, Score Hero game, Dream League Soccer, b612 and descargar b612 gratis. How about you?

    ReplyDelete
  10. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
    Signature:
    messenger indir | messenger indir | messenger | messenger download | messenger indir | messenger indir | download messenger | messenger indir

    ReplyDelete
  11. Thanks for sharing. I hope it will be helpful for too many people that are searching for this topic.
    Red Ball is a online, platform games series, posted by King. It involves a red ball 4 stuck in a world of various levels, and hola launcher is a freemium web and mobile application which claims to provide a faster, private and more secure Internet. Whether you are looking to improve your culinary skills or you simply love whipping up tasty treats, this simulation game named cooking fever will surely leave your mouth watering. Sun, sand, surf, and all the fish you can eat! Sail away to paradise bay, where you'll help Keani and friends restore the island to its former glory. The and, agario is a fun addicting MMO game in which you have to eat or be eaten while you strive to dominate the World of colorful cells. Good happy !

    ReplyDelete
  12. Thanks for sharing this valuable information to our vision.
    Signature:
    Download retrica online includes more than eighty different filters with many different styles and include retrica indir , and zombie tsunami is the ideal game for anyone who loves the running game genre

    ReplyDelete
  13. I would like to thank you for the efforts you have made in writing this article.I would like to thank you for the efforts you have made in writing this article.
    happy wheels , agario , happywheels , agar ,

    ReplyDelete
  14. I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again...

    - usps tracking
    - iphone 7 release date
    - Netflix
    - youtube to mp3
    - facebook video downloader
    - weather

    ReplyDelete
  15. I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again..
    abcya | minecraft 10 | minecraft games

    ReplyDelete
  16. Really great post, Thank you for sharing this knowledge. Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!..

    ReplyDelete
  17. This blog post really grabbed my attention. With that said I am going to subscribe. Therefore I will get more updates on what you have to say. Please keep writing as I want to learn more.

    ReplyDelete
  18. Amaze! I have been looking bing for hours because of this and i also in the end think it is in this article! Maybe I recommend you something helps me all the time? Here's it

    ReplyDelete
  19. I am very sympathetic to your viewpoint. It is very deep and meaningful. I think you should write many more articles to the reader to understand. I would recommend it to everyone.

    ReplyDelete
  20. Great. This article is excellent. I have read many articles with this topic, but I have not liked. I think I have the same opinion with you.

    ReplyDelete
  21. I would like to thank you for the efforts you have made in writing this article.I would like to thank you for the efforts you have made in writing this article.
    strike force kitty 2 | strikeforce kitty 2 | strike force kitty | strike force kitty

    ReplyDelete
  22. Great! Thanks for sharing the information. That is very helpful for increasing my knowledge in this field.
    - minecraft games
    - happy wheels
    - happy wheels
    - tetris
    - brain games
    - puzzle games
    - agario
    - abcya
    - fnaf

    ReplyDelete
  23. It's perfect for those students, who want to study about this faculty. I like the news that you have written in a detail. I like play games ninja games online, free games, Douchebag Workout 2, papa games. How about you?
    Stick RPG

    ReplyDelete
  24. This is a great article. It gave me a lot of useful information. thank you very much. Can you play more games at :

    ninjago games | swords and souls | subway surfers | goodgame big farm | strike force kitty 2 | agario game

    ReplyDelete
  25. Thanks for sharing this Post, Keep Updating such topics.
    incitasecurity

    ReplyDelete
  26. I just wanted to say thank you for sharing a great information and useful. it really necessary and timely for me at this time. I've read a lot of blogs and visit but they made me feel boring. Your article made me feel strange and fascinating it attracted me. I wanted to share this information with my friends on the social network facebook.
    G9G , Dora Games , Kizi new , Huz Games , Kizi hot

    ReplyDelete
  27. You topic is very great and useful for us…thank you And I like play game, If you have a long time than visit to:
    swords and souls | ninjago games | hola launcher | agario | cooking fever | goodgame big farm | red ball 4 | agar io | subway surfers | paradise bay | swords and souls game | strike force kitty 2

    ReplyDelete
  28. Excellent read, Positive site, where did u come up with the information on this posting?

    ReplyDelete
  29. Another great post, I appreciate all the work you put into this site, helping out others with your fun and creative works.

    ReplyDelete
  30. I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again..

    ReplyDelete
  31. Simply want to say your article is as surprising. The clarity on your put up is simply cool and i could suppose you're an expert in this subject.

    ReplyDelete
  32. Wonderful blog! This is very informative site. I am totally pleased by your excellent work
    Many thanks for sharing.
    - Mortal Kombat XL
    - Atari Breakout
    - Dragon Ball Z Games

    ReplyDelete
  33. How are you today? Have a nice day. Thank you for the information you provide. I had a look to start my own. I like play Score Hero, camera b612, papas games, Piano Tiles 2, Dream League Soccer. descargar b612. How about you? Douchebag Workout 2

    ReplyDelete
  34. Thanks for the best blog.it was very useful for me.keep sharing such idea
    s in the future as well.this was actually what i was looking for,and i
    am glad to came here
    earn to die play
    earn to die
    earn to die
    Hi! I’ve been reading your blog for a while now and finally got the
    earn to die 3
    courage to go ahead and give youu a shout out from
    earn to die 6
    Austin Texas! Just wanted to tell
    earn to die 3

    ReplyDelete
  35. Thanks to the nomination Heather! We just did our post and experienced
    iPhonE 7 release date Apple company

    ReplyDelete
  36. اليوم لقد اتيتكم بموقع رائع انا اعجبني شخصيا وهو يحتوي على باقة من العاب بنات جديدة ومتجدد دائما ولمن لا يعرف العاب بنات فهي العاب فلاش تلعب على المتصفح بدون تحميل وتلعب مباشرة والعاب البنات هي بدورها فيها عدة اصناف وهي العاب الماكياج وفي هذا النوع يجب وضع الماكياج للبنت الموجودة في اللعبة وهناك كتير منها ويوجد كذلك العاب طبخ وهذا الصنف عنده محبين اكتر من السابق بفارق كبير وهو المميز عند الجميع سواء كانو بناتا او اولادا وايضا الصغار يلعبون فيه كتيرا وهو الاكتر انتشارا في النت ومواقعه كتيرة ويوجد صنف آخر وهو اقل منه قليلا في الشهرة وهو صنف التلبيس هذا الصنف ايضا يعشقه كتير من البنات وعدد قليل من الاولاد وكل صنف من هذه الاصناف توجد به العاب خاصة بشخصية معينة مشهورة فمتلا باربي ستجدها في جميع هذه الاصناف متلا العاب تلبيس باربي او العاب طبخ باربي او العاب ماكياج باربي وهكذا وهناك شخصيات كتيرة في هذه الالعاب وهي الاكتر شهرة طبعا عن باقي الشخصيات الغير معروفة وهذا الموقع يقدم جميع هذه الاصناف التي تندرج تحت نوع العاب بنات فمرحبا بكم جميعا

    ReplyDelete
  37. Thanks for this help. Hope so that this will help me in my next project. I like play game piano tiles | Piano Tiles | piano tiles 2 game | piano tiles | piano tiles 2 | Dream League Soccer | Score Hero | Score Hero game | Score Hero | Score Hero | Score Hero game | piano tiles 2 | piano tiles 2 game | so much. How about you? B612 | camera b612 | descargar b612 | b612 | b612 | descargar b612 gratis | camera b612 | Dream League Soccer | Stick RPG 2 | Stick RPG | StickRPG2. B612 lets you make collages with your pictures. You can make them with just a regular selfie or a composition of up to nine photographs, and even vertical compositions of two or three pictures.

    ReplyDelete
  38. All the best blogs that is very useful for keeping me share the ideas
    of the future as well this is really what I was looking for, and I am
    very happy to come here. Thank you very much
    earn to die play
    earn to die
    earn to die 3
    Hi! I’ve been reading your blog for a while now and finally got the
    earn to die 4
    courage to go ahead and give youu a shout out from
    earn to die 6
    Austin Texas! Just wanted to tell
    earn to die 5
    you keep up the fantastic work!my weblog
    age of war
    Hi! I’ve been reading your blog for a while now and finally got the
    happy wheels
    strike force heroes
    slither io
    slitherio
    good game empire

    ReplyDelete
  39. I must appreciate the way you have expressed your feelingsthrough your blog!. Click here to play
    shooting games | dog games | fighting games | mickey mouse games | Subway Surfers

    ReplyDelete
  40. Busy life circumstances than the current world history. Must try to earn money to support themselves, their families and pay for living. But not so that you neglect your own health, but more must cherish it. Mario , Friv , Doraemon Games , Kizi , Yoob

    ReplyDelete
  41. Very interesting blog. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definately interested in this one. Just thought that I would post and let you know.
    facebook lite |resignation letter|qr code generator

    ReplyDelete
  42. All the best blogs that is very useful for keeping me share the ideas
    of the future as well this is really what I was looking for, and I am
    very happy to come here. Thank you very much
    earn to die
    earn to die 2
    earn to die 3
    Hi! I’ve been reading your blog for a while now and finally got the
    earn to die 4
    courage to go ahead and give youu a shout out from
    earn to die 6
    Austin Texas! Just wanted to tell
    earn to die 5
    you keep up the fantastic work!my weblog
    age of war
    Hi! I’ve been reading your blog for a while now and finally got the
    happy wheels
    strike force heroes
    slitherio

    ReplyDelete
  43. I really enjoy reading this article. Hope that you would do great in upcoming time. A perfect post.
    nick jr | minecraft games | barney

    ReplyDelete
  44. Thank you for the information you have presented :)
    Certainly no cure every disease

    Cara Ampuh Menyembuhkan Varikokel Pada Pria

    ReplyDelete
  45. Thanks for the best blog.it was very useful for me. Keep sharing such ideas in the future as well. This was actually what i was looking for, and i am glad to came here!
    slither.io skins | Science Kombat | Science Kombat Game | wings.io | Tank Trouble | Tank trouble 2 | Tank trouble 3 | Tank trouble 4

    ReplyDelete
  46. I must appreciate the way you have expressed your feelingsthrough your blog!. Click here to play
    vertix.io

    ReplyDelete
  47. Very good. you are the winner. Do not forget update new information regularly. thank !
    - slither.io
    - wings.io
    - vanar.io
    - lazerdrive.io
    - diep.io

    ReplyDelete
  48. The useful and nice thank you
    Please continue to give me and put more content on your site

    میهن وب هاست


    طراحی سایت پزشکی

    ReplyDelete
  49. The blog or and best that is extremely useful to keep I can share the ideas
    of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
    earn to die 3| earn to die 6
    earn to die 5| happy wheels
    strike force heroes| slitherio
    earn to die 5| good game empire |tank trouble 2 | game tank trouble new

    ReplyDelete
  50. Thanks for sharing the information. It is very useful for my future. keep sharing. Can you play more games at :
    red ball 4 | ninjago games | swords and souls | strike force kitty 2 | run 2 | slitherio | super smash flash 2 | atari breakout

    ReplyDelete
  51. Game online a lot of people who love to help them relieve stress of the moment, such as TinyTanksandTinyPlanesorTiny Planes Beta is the fighting game with a pen or pencil, you have to destroy opponents before they kill you. Or Run 3 Unblocked and Hacked unblocked Gamesare skillful game controller for bears to dance to the goal without falling off a cliff. I wish you happy gaming!

    ReplyDelete
  52. Thank you for such a sweet tutorial - all this time later, I've found it and love the end result. I appreciate the time you spent sharing your skills.
    atari breakout | atari breakout game | breakout atari

    ReplyDelete
  53. iphone7 specifications and compare with other mobiles here
    iphone 7s features

    ReplyDelete
  54. Let’s keep are safe place to play the very best free games for kids! Please click:
    slither.io | wings.io | happy wheels | abcya | fnaf 4 | happy wheels the game free | tetris to play for free!

    ReplyDelete
  55. Great post,Thanks for providing us this great knowledge,Keep it up.
    run 2 unblocked | slitherio | run 2 unblocked | slither io | run 2 game | slither.io

    ReplyDelete
  56. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
    monkey go happy | mahjong| superfighters 2 |yahtzee with buddies|defend your nuts 2 | happy wheels | cat mario

    ReplyDelete
  57. We thank you for sharing. If you feel tired because the work is too stressful or pressure from our study let's try this fascinating game offline. Thank you
    date of friendship day
    where will the summer olympics be held in 2016

    ReplyDelete
  58. You actually make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. new balance 574 hombre I'm looking forward for your next post, I'll try to get the hang of it!

    ReplyDelete
  59. work Done Now forever Techworld and bank

    Them  New dawn I Love this article. it was a great one.
    http://www.techvaid.com/www-yahoomail-com-yahoomail-com-yahoo-mail-login/

    ReplyDelete
  60. We feel very happy about that. You should also try my best to play our FREE today to get the sense of fun that brings. Vex 2 Game | mobogenie market | clickjogos | descargar whatsapp | drag racer| Banana Kong | spider solitaire | dhl tracking number

    ReplyDelete
  61. I was working and suddenly I visits your site frequently and recommended it to me to read also. Age Of War 2
    Big Farm | Slitherio
    Tank Trouble | Happy Wheels
    Goodgeme Empire | Slither.io

    ReplyDelete
  62. I feel firmly about it Slither.io, Friv and also really like comprehending far more with this particular subject matter ABCya, GirlsGoGames. In case doable Hopy, Y8, is it possible to thoughts modernizing your site DiDi, Friv 2017
    I truly cherished perusing Friv 2018, Friv 2 School your online journal Y88, Y8Y8 . It was extremely very much composed Y8 Games, Friv 4 School and straightforward Friv, K7x . Thanks alot!

    ReplyDelete
  63. This is a great web site Y1 Games, Y2 Games Good sparkling user interface and Y4 Games, Y5 Games very informative blogs Y6 Games Y7 Games. I have found it enormously useful.Y10 Games
    I love all the posts Friv 4 School, Kizi 8, I really enjoyed,would like more information about thisKizi 9, because it is very niceFriv 8, Friv.Com Thanks for sharingFriv4School, Fynsy

    ReplyDelete
  64. Rolex Watches Authentic Mens & Ladies Rolex Datejust, President Watches for Sale at JavyEstrella.com.

    ReplyDelete
  65. dumpster rental alexandria Galaxy Transfer is based in Northern Virginia and is a division of EnviroSolutions, Inc. GT was purchased by EnviroSolutions, Inc. in June 2013.

    ReplyDelete
  66. Nice post and great community which can help with comment in every fields and increase knowledge of all field because every person share different iedas and topics so its very nice post to archive good tips for life. thanks for this post.
    tech23hqe
    techstarusa
    tweheartit

    ReplyDelete
  67. I was working and suddenly I visits your site frequently and recommended it to me to read also. Age Of War 2
    Big Farm | Slitherio
    Tank Trouble | Happy Wheels
    Goodgeme Empire | Slither.io

    ReplyDelete

  68. Wonderful post! this share best article and thoughts and provide best community in all over the world. Special thanks for this post and getting good services of this sites.
    kimgfave
    tips
    provider

    ReplyDelete
  69. learn to never give up, you have to learn the power and wisdom of site hereunconditional surrender, and that one doesn’t cancel out the other; Drug Prices

    ReplyDelete
  70. nice! thank you so much! Thank you for sharing. Your blog posts are more interesting and impressive. I think there are many people like and visit it regularly, including me.
    192.168.1.1

    ReplyDelete

  71. Thanks for giving this apporchnity to post a comment in your commuty is a nice post sharin by you thanks.
    headsbookt
    hidpost
    classifiehigl

    ReplyDelete
  72. Thanks This is the best community for discussion about any topics and sharing best ideas, knowledge and thought. and have great Article sharing platform. I like this concept. Thanks a lot of all.
    panknowpan
    panknow
    knowpan

    ReplyDelete
  73. I really liked your article , your article is very petrified me in the learning process and provide additional knowledge to me , maybe I can learn more from you , I will wait for your next article article , thanks
    asandridndidphne
    ndrotdsoid
    arotasandrid

    ReplyDelete
  74. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.

    Discover our website bounty of free online games now!
    Our website has the biggest collection of free online games. Totally new games are added every day!

    age of war 2
    gold Miner 2
    unfair Mario 2
    cubefield 2
    tanki Online 2

    ReplyDelete
  75. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    obat aborsi

    ReplyDelete
  76. NICE for giving a chance to share ideas for your comuty i really thanks for that great post.
    jhfkdfk
    giuijds
    kfkhf

    ReplyDelete
  77. Thanks for sharing. Great stuff

    ReplyDelete
  78. Thanks for giving this apporchnity to post a comment in your commuty is a nice post sharin by you thanks.
    headsbookt
    hidpost
    classifiehigl

    ReplyDelete
  79. Thanks for sharing this post i really liked of this kind of community grreat post.
    fress
    press
    complicate
    fress

    ReplyDelete
  80. The game controls are shown just under . Movement mechanisms primarily include acceleration and tilting controls.
    five nights at freddy's 2 | five nights at freddy's 4 |
    fireboy and watergirl 2 | 2048 game | red ball 5 | age of war

    ReplyDelete