ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Operation squence not valid & running out of indicators.

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

  • Operation squence not valid & running out of indicators.

    I have a scenario here. Where i have to do a validation on 6 similar fields and turn up Reverse image whenever there are errors.I am running out of indicators .Can anyone pls suggest me some other way of doing these.I have to do the same for different set of fields too.



    There is another scenario where i am trying to update the file.and it gives me an error saying

    Operation sequence not valid for member.

    I am trying to validate the data using a chain operation to see if the record exists before doing the above operation.

    If i am not doing the chain the update works fine.however after he chain it says the error.

    Anyway out of this.?

  • #2
    Re: Operation squence not valid & running out of indicators.

    code please.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: Operation squence not valid & running out of indicators.

      Originally posted by DeadManWalks View Post
      code please.
      Cannot post the code.Since i am not alllowed to do.Do you require the error description code.Please let me know wht els i can help you with.

      Comment


      • #4
        Re: Operation squence not valid & running out of indicators.

        Simple answer might be "Don't use indicators." Why are you using them? Use &program-to-system fields and set the attributes with DSPATR(&program-to-system).
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment


        • #5
          Re: Operation squence not valid & running out of indicators.

          create an indicator array -- there are some examples on the site.
          then save the indicators prior to the *NEW section you are using.
          then reuse an indicator and when you leave the new section..
          Put the indicators back to what they were before you started.

          This would be difficult to follow and not recommended, but put a bunch
          of documentation around the code so others wont get AS lost.

          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


          • #6
            Re: Operation squence not valid & running out of indicators.

            I'm with tom here....p-field is the way to go:
            It may appear that text-based screens are dead, but looks can be deceiving. Text-based interfaces, or “green screens,” are still very widely used, and not just on iSeries systems. What’s more, text-based systems are not going away anytime soon, because they’re effective and easy to develop. As long as we still have to write them,


            Best of Luck
            GLS
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment


            • #7
              Re: Operation squence not valid & running out of indicators.

              thanks but i need position cursor also.guess i hv to go jamie's way Jamie if u could kindly post a small code snippet tht would be helpful.Inever used an indicator array as well not able to understand you.
              Last edited by satya; March 17, 2014, 12:29 PM.

              Comment


              • #8
                Re: Operation squence not valid & running out of indicators.

                Step 1
                Code:
                     A                                      INDARA
                Step 2
                Code:
                     FGl800Fm   CF   E             WORKSTN InDds(Indicators)
                Step 3
                Code:
                     d Indicators      ds
                     d  InExit                 1      1n
                     d  InSearch               3      3n
                     d  InUpdate               7      7n
                     d  ErrorFromYear...
                     d                        30     30n
                     d  ErrorStore            31     31n
                     d  ErrorFromPer          32     32n
                     d  ErrorToYear           33     33n
                     d  ErrorToPer            34     34n
                
                     d  Error_From_Major...
                     d                        35     35n
                     d  Error_From_Minor...
                     d                        36     36n
                     d  Error_To_Major...
                     d                        37     37n
                     d  Error_To_Minor...
                     d                        38     38n
                Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

                Comment


                • #9
                  Re: Operation squence not valid & running out of indicators.

                  Originally posted by satya View Post
                  thanks but i need position cursor also.guess i hv to go jamie's way Jamie if u could kindly post a small code snippet tht would be helpful.Inever used an indicator array as well not able to understand you.
                  You can use the QUSLFLD (List Field) api to locate the field positions on your display format. Once you have that you can set your cursor location and eliminate the position cursor indicators.

                  Comment


                  • #10
                    Re: Operation squence not valid & running out of indicators.

                    With only six fields, it's hard to guess how there could be a problem with "running out of indicators". But even for PC, indicators aren't needed. Use the CSRLOC() record-level keyword to position the cursor.
                    Tom

                    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                    Comment


                    • #11
                      Re: Operation squence not valid & running out of indicators.

                      At a guess, you'd need only two indicators per field (one for PC and RI) and maybe one for PR (assuming that they couldn't share the PR indicator, which they usually can). So that would be 12 indicators at most...?

                      As for your CHAIN problem, again Im guessing, but how about - you are using READ or CHAIN to pick up the record, some user input maybe, you are CHAINing again to find if the new record exists, (it doesn't), so you issue an UPDATE and it fails... ? If thats the case, your mistake is CHAINing to find the new record - don't do that!

                      Comment

                      Working...
                      X