ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

use *ALL + value in FREE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • use *ALL + value in FREE

    Hey All !

    I want to code something like this in FREE:

    ILE-RPG: eval fielda = *ALL fieldb
    or eval fielda = *ALL 'hello'

    but i do not know how !
    Any Test's are wrong !

    Can anybody help me to code those examples in FREE ?

    Thanks in Advance !
    Once there was a river, now there's a Stone !

  • #2
    Re: use *ALL + value in FREE

    Hi,

    what do you mean with "Are wrong"?

    With *ALL'Hello', Hello will be repeated over and over again, until the end of the result field. (This work in fix and free format).

    *ALL FldName is not allowed and will neither run in fixed nor in free format, instead you'll get a syntax error and your program will not be compiled.

    For repeating a specific string for several times, you may have a look at the SQL scalar function REPEAT.

    PHP Code:
    Exec SQL  Set :MyString =  Repeat(:MyFld100); 
    BTW have you ever tried to post you questions in an German forum, such as NewSolutions forum?
    NewSolutions Forum

    Birgitta

    Comment


    • #3
      Re: use *ALL + value in FREE

      If you only want the string Hello repeated, you can also:
      Code:
      D Hello           S             40A   INZ(*ALL'Hello')       
       /free                                                       
            dsply hello;                                           
        *InLr = *On;                                               
       /End-Free
      HelloHello, It works !
      The stange thing is, I only can INZ it ! Why can't I make it a contant value?

      Comment


      • #4
        Re: use *ALL + value in FREE

        Thank's Birgitta !
        Yes, i know the Forum NewSoloution.

        But there is a man, i think his name is "Fuerchau", he is an "hard" man, some Answer are "down under" !
        And every time i answer on a question in NewSoloution, his answer
        is earlyer in Date and time, even though there was no answer from him, when i type my answer !

        And so i use code400, they are (such like you) friendly and fair !

        Thank's again !


        Originally posted by B.Hauser View Post
        Hi,

        what do you mean with "Are wrong"?

        With *ALL'Hello', Hello will be repeated over and over again, until the end of the result field. (This work in fix and free format).

        *ALL FldName is not allowed and will neither run in fixed nor in free format, instead you'll get a syntax error and your program will not be compiled.

        For repeating a specific string for several times, you may have a look at the SQL scalar function REPEAT.

        PHP Code:
        Exec SQL  Set :MyString =  Repeat(:MyFld100); 
        BTW have you ever tried to post you questions in an German forum, such as NewSolutions forum?
        NewSolutions Forum

        Birgitta
        Once there was a river, now there's a Stone !

        Comment


        • #5
          Re: use *ALL + value in FREE

          Thanks, Marc_d !

          And yes,
          "The stange thing is, I only can INZ it ! Why can't I make it a contant value?"

          Yes it is !



          Originally posted by Marc_d View Post
          If you only want the string Hello repeated, you can also:
          Code:
          D Hello           S             40A   INZ(*ALL'Hello')       
           /free                                                       
                dsply hello;                                           
            *InLr = *On;                                               
           /End-Free
          HelloHello, It works !
          The stange thing is, I only can INZ it ! Why can't I make it a contant value?
          Once there was a river, now there's a Stone !

          Comment


          • #6
            Re: use *ALL + value in FREE

            Originally posted by Peetluka View Post
            Thanks, Marc_d !

            And yes,
            "The stange thing is, I only can INZ it ! Why can't I make it a contant value?"

            Yes it is !
            a constant value must have a constant length. since constants in D spec do not allow for you to specify a length, how would the compiler know when the max length/iteration for *ALL would terminate?
            I'm not anti-social, I just don't like people -Tommy Holden

            Comment


            • #7
              Re: use *ALL + value in FREE

              Hey Peet,

              be afraid, be very afraid --> of B.
              She always kaks on me when I post there in english. My german is not that good (hell, even my english is deteriorating), so sometimes I reply in english.. and suffer the consequences from B. afterwards.
              Regards

              Kit
              http://www.ecofitonline.com
              DeskfIT - ChangefIT - XrefIT
              ___________________________________
              There are only 3 kinds of people -
              Those that can count and those that can't.

              Comment


              • #8
                Re: use *ALL + value in FREE

                @Kit,

                I also have to write in English in those forums, because you may be almost the only one, who understands German.
                BTW, your German is at least as good as my English.

                @peetluka
                I agree with you. Baldur Fuerchau sometimes thinks because he's moderator he has to response to all question, independent if he knows the answer or not ... and he hurries up being the first to answer. We already suspected, he is permanently observing the forum and as soon as someone posts, he jumps in.

                Comment


                • #9
                  Re: use *ALL + value in FREE

                  Originally posted by B.Hauser View Post
                  @peetluka
                  I agree with you. Baldur Fuerchau sometimes thinks because he's moderator he has to response to all question, independent if he knows the answer or not ... and he hurries up being the first to answer. We already suspected, he is permanently observing the forum and as soon as someone posts, he jumps in.
                  WOW there's more people like me out there????
                  I'm not anti-social, I just don't like people -Tommy Holden

                  Comment


                  • #10
                    Re: use *ALL + value in FREE

                    Originally posted by B.Hauser View Post
                    @Kit,

                    I also have to write in English in those forums, because you may be almost the only one, who understands German.
                    BTW, your German is at least as good as my English.

                    @peetluka
                    I agree with you. Baldur Fuerchau sometimes thinks because he's moderator he has to response to all question, independent if he knows the answer or not ... and he hurries up being the first to answer. We already suspected, he is permanently observing the forum and as soon as someone posts, he jumps in.
                    Birgitta,
                    vielen Dank, ich bin ganz platt, dass es euch auch aufgefallen ist mit Baldur.
                    Deutsch spreche und schreibe ich im übrigen naturgemäß auch besser

                    An dieser Stelle aber auch noch einmal meinen ausdrücklichen Dank für die tolle Hilfe durch Dich, nicht nur hier oder in anderen Foren, auch bei verschiedenen Veranstaltungen (ich war leider selber noch auf keiner, wo Du aufgetreten bist .. die Zeit, die liebe Zeit) durch Dich persönlich oder auch durch Deine "Dokumente" zu verschiedenen Fachthemen.

                    Wir können dann in Zukunft auch hier in Deutsch "talken", wenn
                    sonst keiner etwas dagegen hat.

                    Also, auf bald !
                    Peetluka
                    Once there was a river, now there's a Stone !

                    Comment


                    • #11
                      Re: use *ALL + value in FREE

                      Thanks alot Birgitta I just went to http://www.newsolutions.de/forum-sys...00-i5-iseries/ clicked a couple ads and now I own both a BMW and a Mercedes....... well of course after 4 or 5 thousand monthly payments...

                      Nice!

                      jamie
                      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

                      Comment


                      • #12
                        Re: use *ALL + value in FREE

                        @Peetluka,

                        first thanks for the compilments.

                        I'll just translate your comment (even though Kit as native speaker would be better in translation to English), so others can understand it.

                        Translation (or at least something, that is close to it).
                        Thanks a lot, I'm suprised that also others also had the same feeling about Baldur. Being native German speaker, it's easier to write in German than in English. (BTW same for me!)

                        I'll say thank your for all your help, not only in this forum but also in others, several events and conferences (even thought I did not yet participate in any event, where you were a speaker, no time, no time!) and also for several articles and handouts I found.

                        In this way it may be possible to use German in this forum, at least if others will agree.


                        If you like to send me a message in German, just use the private messages. I think it's not a good idea to start a German forum within an English forum. Otherwise we'll soon have an Englisch, French, German, Hindi, Spain, Arabian ... Forum. If you need some help with translation, you may ask Kit (sorry Kit I just decided it for you) or me.

                        Birgitta

                        Comment


                        • #13
                          Re: use *ALL + value in FREE

                          Originally posted by B.Hauser View Post
                          ... and he hurries up being the first to answer.
                          ... and last as well.

                          I just prefer the humour here. Although I must admit I did read a humurous answer there (once ). After someone responded with a quote from the IBM English manual/redbook, the thread starter responded ... "zank you" Brilliant
                          Regards

                          Kit
                          http://www.ecofitonline.com
                          DeskfIT - ChangefIT - XrefIT
                          ___________________________________
                          There are only 3 kinds of people -
                          Those that can count and those that can't.

                          Comment


                          • #14
                            Re: use *ALL + value in FREE

                            Originally posted by B.Hauser View Post
                            If you need some help with translation, you may ask Kit (sorry Kit I just decided it for you) or me.
                            ufff... I must rethink this postcard thing next time, I'll be too busy translating ... and anyhows, everyone here complains that when I come back from holiday my german is worse (which is 1 reason I just read and seldom answer).
                            Last edited by kitvb1; May 5, 2009, 12:17 AM.
                            Regards

                            Kit
                            http://www.ecofitonline.com
                            DeskfIT - ChangefIT - XrefIT
                            ___________________________________
                            There are only 3 kinds of people -
                            Those that can count and those that can't.

                            Comment


                            • #15
                              Re: use *ALL + value in FREE

                              Originally posted by jamief View Post
                              ... and now I own both a BMW and a Mercedes.......
                              As long as the Merc is sorta beige in colour, you're ok! You can become a taxi driver then and the car will last forever.
                              Regards

                              Kit
                              http://www.ecofitonline.com
                              DeskfIT - ChangefIT - XrefIT
                              ___________________________________
                              There are only 3 kinds of people -
                              Those that can count and those that can't.

                              Comment

                              Working...
                              X