How to give an error message if none the records are matching in FOR EACH loop?Frame only displaying last record in tableusing .NET web service (Dataset) from progress OpenEdge 4GLDatasource + .NET controlsOpenedge 8.3c Dynamic QueryDynamic Field Validation Progress-4GLHow do I skip to the next record on a find within a for each progress4gl?Two different FOR EACH (BREAK BY with JOIN) loops are giving unexpectedly different results?how to use for each loop in Progress?How to match a records in progress 4GL?How to matches two records using ENTRY in progress 4GL?

Microservices and Stored Procedures

Which block cipher parameters should be kept secret?

Amiga 500 OCS/ECS vs Mega Drive VDP

Should the pagination be reset when changing the order?

How can I check that parent has more than 1 child?

Why are there two bearded faces wearing red hats on my stealth bomber icon?

Could the Orion project pusher plate model be used for asteroid deflection?

Why is belonging not transitive?

Problem of Induction: Dissolved

Can one guy with a duplicator trigger a nuclear apocalypse?

Can I separate garlic into cloves for storage?

Do household ovens ventilate heat to the outdoors?

What was the deeper meaning of Hermione wanting the cloak?

Carroll's interpretation of 1-forms

Hobby function generators

Are lay articles good enough to be the main source of information for PhD research?

Inquiry answerer

Is it safe to put a microwave in a walk-in closet?

What is the word for a person who destroys monuments?

Is Yang not precluded from conducting his "UBI experiment" as an electoral candidate?

Whence comes increasing usage of "do" for "have" in ordering food?

Compare FEM mesh with the mesh created within Mathematica

My passport was stamped with an exit stamp while transiting to another Schengen country via Turkey. Was this a mistake?

Account creation and log-in system



How to give an error message if none the records are matching in FOR EACH loop?


Frame only displaying last record in tableusing .NET web service (Dataset) from progress OpenEdge 4GLDatasource + .NET controlsOpenedge 8.3c Dynamic QueryDynamic Field Validation Progress-4GLHow do I skip to the next record on a find within a for each progress4gl?Two different FOR EACH (BREAK BY with JOIN) loops are giving unexpectedly different results?how to use for each loop in Progress?How to match a records in progress 4GL?How to matches two records using ENTRY in progress 4GL?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have written a program for matching one records to another records in FOR Each loop but i don't know how to give an error message if none of the records are matching. Let me share my codes



DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
DEFINE TEMP-TABLE tt_data NO-UNDO
FIELD cPosition AS CHARACTER FORMAT "X(60)"
FIELD cEndCode AS CHARACTER
FIELD cShotCode AS CHARACTER.
/*so many records are stored in tt_data and below is one of the records for your understanding*/

CREATE tt_data.
ASSIGN
tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
tt_data.cEndCode = 10
tt_data.cShotCode = "S".

cPos = integer( tt_data.cEndCode / 10 ).

/* Consider 60 records available in tt_data */
FOR EACH tt_data.

FIND FIRST tt_date WHERE tt_data.cShotCode =
SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

DISPLAY tt_data.cShotCode. /* Displayed Value is S */

IF NOT AVAILABLE tt_date THEN
MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition "
LEAVE.
END.


I can get at least one record matching in tt_data. Here the problem is I don't want to LEAVE if any one record is matching but I want to get an error message with LEAVE statement if none of the records are matching. Could you please help this case?










share|improve this question
































    0















    I have written a program for matching one records to another records in FOR Each loop but i don't know how to give an error message if none of the records are matching. Let me share my codes



    DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
    DEFINE TEMP-TABLE tt_data NO-UNDO
    FIELD cPosition AS CHARACTER FORMAT "X(60)"
    FIELD cEndCode AS CHARACTER
    FIELD cShotCode AS CHARACTER.
    /*so many records are stored in tt_data and below is one of the records for your understanding*/

    CREATE tt_data.
    ASSIGN
    tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
    tt_data.cEndCode = 10
    tt_data.cShotCode = "S".

    cPos = integer( tt_data.cEndCode / 10 ).

    /* Consider 60 records available in tt_data */
    FOR EACH tt_data.

    FIND FIRST tt_date WHERE tt_data.cShotCode =
    SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

    DISPLAY tt_data.cShotCode. /* Displayed Value is S */

    IF NOT AVAILABLE tt_date THEN
    MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition "
    LEAVE.
    END.


    I can get at least one record matching in tt_data. Here the problem is I don't want to LEAVE if any one record is matching but I want to get an error message with LEAVE statement if none of the records are matching. Could you please help this case?










    share|improve this question




























      0












      0








      0








      I have written a program for matching one records to another records in FOR Each loop but i don't know how to give an error message if none of the records are matching. Let me share my codes



      DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
      DEFINE TEMP-TABLE tt_data NO-UNDO
      FIELD cPosition AS CHARACTER FORMAT "X(60)"
      FIELD cEndCode AS CHARACTER
      FIELD cShotCode AS CHARACTER.
      /*so many records are stored in tt_data and below is one of the records for your understanding*/

      CREATE tt_data.
      ASSIGN
      tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
      tt_data.cEndCode = 10
      tt_data.cShotCode = "S".

      cPos = integer( tt_data.cEndCode / 10 ).

      /* Consider 60 records available in tt_data */
      FOR EACH tt_data.

      FIND FIRST tt_date WHERE tt_data.cShotCode =
      SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

      DISPLAY tt_data.cShotCode. /* Displayed Value is S */

      IF NOT AVAILABLE tt_date THEN
      MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition "
      LEAVE.
      END.


      I can get at least one record matching in tt_data. Here the problem is I don't want to LEAVE if any one record is matching but I want to get an error message with LEAVE statement if none of the records are matching. Could you please help this case?










      share|improve this question
















      I have written a program for matching one records to another records in FOR Each loop but i don't know how to give an error message if none of the records are matching. Let me share my codes



      DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
      DEFINE TEMP-TABLE tt_data NO-UNDO
      FIELD cPosition AS CHARACTER FORMAT "X(60)"
      FIELD cEndCode AS CHARACTER
      FIELD cShotCode AS CHARACTER.
      /*so many records are stored in tt_data and below is one of the records for your understanding*/

      CREATE tt_data.
      ASSIGN
      tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
      tt_data.cEndCode = 10
      tt_data.cShotCode = "S".

      cPos = integer( tt_data.cEndCode / 10 ).

      /* Consider 60 records available in tt_data */
      FOR EACH tt_data.

      FIND FIRST tt_date WHERE tt_data.cShotCode =
      SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

      DISPLAY tt_data.cShotCode. /* Displayed Value is S */

      IF NOT AVAILABLE tt_date THEN
      MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition "
      LEAVE.
      END.


      I can get at least one record matching in tt_data. Here the problem is I don't want to LEAVE if any one record is matching but I want to get an error message with LEAVE statement if none of the records are matching. Could you please help this case?







      openedge progress-4gl






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 13:54







      Thiru

















      asked Mar 28 at 13:45









      ThiruThiru

      696 bronze badges




      696 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          1
















          I think this might be what you are trying to do:



          DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
          DEFINE TEMP-TABLE tt_data NO-UNDO
          FIELD cPosition AS CHARACTER FORMAT "X(60)"
          FIELD cEndCode AS CHARACTER
          FIELD cShotCode AS CHARACTER.

          /*so many records are stored in tt_data and below is one of the records for your understanding*/

          CREATE tt_data.
          ASSIGN
          tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
          tt_data.cEndCode = 10
          tt_data.cShotCode = "S".

          cPos = integer( tt_data.cEndCode / 10 ).

          /* Consider 60 records available in tt_data */

          FOR EACH tt_data: /* although it 'works', "." is not appropriate, FOR EACH should end with a ":" */

          FIND FIRST tt_date WHERE tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

          /* changes start here */

          IF AVAILABLE tt_date THEN
          do:
          DISPLAY tt_data.cShotCode. /* Displayed Value is S */ /* only display this when it is available! */
          end.
          else
          do:
          MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition ". /* a "." was missing */
          /* LEAVE. */
          end.

          END.





          share|improve this answer


































            0
















            I would personally try to do the error check before you ever get in the FOR EACH block. Sometimes you can't, but based on your sample code I think you could examine the temp-table first and provide an error message. But I'm not completely sure what you are going for based on the sample.



            DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
            DEFINE TEMP-TABLE tt_data NO-UNDO
            FIELD cPosition AS CHARACTER FORMAT "X(60)"
            FIELD cEndCode AS CHARACTER
            FIELD cShotCode AS CHARACTER.
            /*so many records are stored in tt_data and below is one of the records for your understanding*/

            CREATE tt_data.
            ASSIGN
            tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
            tt_data.cEndCode = 10
            tt_data.cShotCode = "S".

            cPos = integer( tt_data.cEndCode / 10 ).


            /* Add check here */
            IF can-find( FIRST tt_date WHERE
            tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1 ) )
            THEN
            message "ERROR message".

            ELSE DO:
            /* Consider 60 records available in tt_data */
            FOR EACH tt_data.
            /* DO thing */
            END.
            END.





            share|improve this answer



























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );














              draft saved

              draft discarded
















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55399171%2fhow-to-give-an-error-message-if-none-the-records-are-matching-in-for-each-loop%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1
















              I think this might be what you are trying to do:



              DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
              DEFINE TEMP-TABLE tt_data NO-UNDO
              FIELD cPosition AS CHARACTER FORMAT "X(60)"
              FIELD cEndCode AS CHARACTER
              FIELD cShotCode AS CHARACTER.

              /*so many records are stored in tt_data and below is one of the records for your understanding*/

              CREATE tt_data.
              ASSIGN
              tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
              tt_data.cEndCode = 10
              tt_data.cShotCode = "S".

              cPos = integer( tt_data.cEndCode / 10 ).

              /* Consider 60 records available in tt_data */

              FOR EACH tt_data: /* although it 'works', "." is not appropriate, FOR EACH should end with a ":" */

              FIND FIRST tt_date WHERE tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

              /* changes start here */

              IF AVAILABLE tt_date THEN
              do:
              DISPLAY tt_data.cShotCode. /* Displayed Value is S */ /* only display this when it is available! */
              end.
              else
              do:
              MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition ". /* a "." was missing */
              /* LEAVE. */
              end.

              END.





              share|improve this answer































                1
















                I think this might be what you are trying to do:



                DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
                DEFINE TEMP-TABLE tt_data NO-UNDO
                FIELD cPosition AS CHARACTER FORMAT "X(60)"
                FIELD cEndCode AS CHARACTER
                FIELD cShotCode AS CHARACTER.

                /*so many records are stored in tt_data and below is one of the records for your understanding*/

                CREATE tt_data.
                ASSIGN
                tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
                tt_data.cEndCode = 10
                tt_data.cShotCode = "S".

                cPos = integer( tt_data.cEndCode / 10 ).

                /* Consider 60 records available in tt_data */

                FOR EACH tt_data: /* although it 'works', "." is not appropriate, FOR EACH should end with a ":" */

                FIND FIRST tt_date WHERE tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

                /* changes start here */

                IF AVAILABLE tt_date THEN
                do:
                DISPLAY tt_data.cShotCode. /* Displayed Value is S */ /* only display this when it is available! */
                end.
                else
                do:
                MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition ". /* a "." was missing */
                /* LEAVE. */
                end.

                END.





                share|improve this answer





























                  1














                  1










                  1









                  I think this might be what you are trying to do:



                  DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
                  DEFINE TEMP-TABLE tt_data NO-UNDO
                  FIELD cPosition AS CHARACTER FORMAT "X(60)"
                  FIELD cEndCode AS CHARACTER
                  FIELD cShotCode AS CHARACTER.

                  /*so many records are stored in tt_data and below is one of the records for your understanding*/

                  CREATE tt_data.
                  ASSIGN
                  tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
                  tt_data.cEndCode = 10
                  tt_data.cShotCode = "S".

                  cPos = integer( tt_data.cEndCode / 10 ).

                  /* Consider 60 records available in tt_data */

                  FOR EACH tt_data: /* although it 'works', "." is not appropriate, FOR EACH should end with a ":" */

                  FIND FIRST tt_date WHERE tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

                  /* changes start here */

                  IF AVAILABLE tt_date THEN
                  do:
                  DISPLAY tt_data.cShotCode. /* Displayed Value is S */ /* only display this when it is available! */
                  end.
                  else
                  do:
                  MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition ". /* a "." was missing */
                  /* LEAVE. */
                  end.

                  END.





                  share|improve this answer















                  I think this might be what you are trying to do:



                  DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
                  DEFINE TEMP-TABLE tt_data NO-UNDO
                  FIELD cPosition AS CHARACTER FORMAT "X(60)"
                  FIELD cEndCode AS CHARACTER
                  FIELD cShotCode AS CHARACTER.

                  /*so many records are stored in tt_data and below is one of the records for your understanding*/

                  CREATE tt_data.
                  ASSIGN
                  tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
                  tt_data.cEndCode = 10
                  tt_data.cShotCode = "S".

                  cPos = integer( tt_data.cEndCode / 10 ).

                  /* Consider 60 records available in tt_data */

                  FOR EACH tt_data: /* although it 'works', "." is not appropriate, FOR EACH should end with a ":" */

                  FIND FIRST tt_date WHERE tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1) NO-LOCK NO-ERROR.

                  /* changes start here */

                  IF AVAILABLE tt_date THEN
                  do:
                  DISPLAY tt_data.cShotCode. /* Displayed Value is S */ /* only display this when it is available! */
                  end.
                  else
                  do:
                  MESSAGE "NONE OF THE RECORDS MATCHING WITH tt_data.cPosition ". /* a "." was missing */
                  /* LEAVE. */
                  end.

                  END.






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Mar 28 at 14:05

























                  answered Mar 28 at 14:00









                  Tom BascomTom Bascom

                  9,6382 gold badges22 silver badges28 bronze badges




                  9,6382 gold badges22 silver badges28 bronze badges


























                      0
















                      I would personally try to do the error check before you ever get in the FOR EACH block. Sometimes you can't, but based on your sample code I think you could examine the temp-table first and provide an error message. But I'm not completely sure what you are going for based on the sample.



                      DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
                      DEFINE TEMP-TABLE tt_data NO-UNDO
                      FIELD cPosition AS CHARACTER FORMAT "X(60)"
                      FIELD cEndCode AS CHARACTER
                      FIELD cShotCode AS CHARACTER.
                      /*so many records are stored in tt_data and below is one of the records for your understanding*/

                      CREATE tt_data.
                      ASSIGN
                      tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
                      tt_data.cEndCode = 10
                      tt_data.cShotCode = "S".

                      cPos = integer( tt_data.cEndCode / 10 ).


                      /* Add check here */
                      IF can-find( FIRST tt_date WHERE
                      tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1 ) )
                      THEN
                      message "ERROR message".

                      ELSE DO:
                      /* Consider 60 records available in tt_data */
                      FOR EACH tt_data.
                      /* DO thing */
                      END.
                      END.





                      share|improve this answer





























                        0
















                        I would personally try to do the error check before you ever get in the FOR EACH block. Sometimes you can't, but based on your sample code I think you could examine the temp-table first and provide an error message. But I'm not completely sure what you are going for based on the sample.



                        DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
                        DEFINE TEMP-TABLE tt_data NO-UNDO
                        FIELD cPosition AS CHARACTER FORMAT "X(60)"
                        FIELD cEndCode AS CHARACTER
                        FIELD cShotCode AS CHARACTER.
                        /*so many records are stored in tt_data and below is one of the records for your understanding*/

                        CREATE tt_data.
                        ASSIGN
                        tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
                        tt_data.cEndCode = 10
                        tt_data.cShotCode = "S".

                        cPos = integer( tt_data.cEndCode / 10 ).


                        /* Add check here */
                        IF can-find( FIRST tt_date WHERE
                        tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1 ) )
                        THEN
                        message "ERROR message".

                        ELSE DO:
                        /* Consider 60 records available in tt_data */
                        FOR EACH tt_data.
                        /* DO thing */
                        END.
                        END.





                        share|improve this answer



























                          0














                          0










                          0









                          I would personally try to do the error check before you ever get in the FOR EACH block. Sometimes you can't, but based on your sample code I think you could examine the temp-table first and provide an error message. But I'm not completely sure what you are going for based on the sample.



                          DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
                          DEFINE TEMP-TABLE tt_data NO-UNDO
                          FIELD cPosition AS CHARACTER FORMAT "X(60)"
                          FIELD cEndCode AS CHARACTER
                          FIELD cShotCode AS CHARACTER.
                          /*so many records are stored in tt_data and below is one of the records for your understanding*/

                          CREATE tt_data.
                          ASSIGN
                          tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
                          tt_data.cEndCode = 10
                          tt_data.cShotCode = "S".

                          cPos = integer( tt_data.cEndCode / 10 ).


                          /* Add check here */
                          IF can-find( FIRST tt_date WHERE
                          tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1 ) )
                          THEN
                          message "ERROR message".

                          ELSE DO:
                          /* Consider 60 records available in tt_data */
                          FOR EACH tt_data.
                          /* DO thing */
                          END.
                          END.





                          share|improve this answer













                          I would personally try to do the error check before you ever get in the FOR EACH block. Sometimes you can't, but based on your sample code I think you could examine the temp-table first and provide an error message. But I'm not completely sure what you are going for based on the sample.



                          DEFINE VARIABLE cPos AS INTEGER NO-UNDO.
                          DEFINE TEMP-TABLE tt_data NO-UNDO
                          FIELD cPosition AS CHARACTER FORMAT "X(60)"
                          FIELD cEndCode AS CHARACTER
                          FIELD cShotCode AS CHARACTER.
                          /*so many records are stored in tt_data and below is one of the records for your understanding*/

                          CREATE tt_data.
                          ASSIGN
                          tt_data.cPosition ="S$$$^^^^^^^^^^$$$^^^MC^^^^^^^^^^^^R^^^^^^^^^^^^^^^^^^^^^^^^^"
                          tt_data.cEndCode = 10
                          tt_data.cShotCode = "S".

                          cPos = integer( tt_data.cEndCode / 10 ).


                          /* Add check here */
                          IF can-find( FIRST tt_date WHERE
                          tt_data.cShotCode = SUBSTRING(tt_data.cPosition,cPos,1 ) )
                          THEN
                          message "ERROR message".

                          ELSE DO:
                          /* Consider 60 records available in tt_data */
                          FOR EACH tt_data.
                          /* DO thing */
                          END.
                          END.






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jun 10 at 14:05









                          Jeff GrandeJeff Grande

                          514 bronze badges




                          514 bronze badges































                              draft saved

                              draft discarded















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55399171%2fhow-to-give-an-error-message-if-none-the-records-are-matching-in-for-each-loop%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현