Logical Error

When I enter new customer number it wont go to the next screen, Can any one please help me out?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave FordSoftware Developer / Database AdministratorCommented:
The "RECORD IS NOT ON FILE" error you see occurs when the CHAIN on line 57 didn't find a matching record, right? Is that indicator in  the right position?
mustish1Author Commented:
What change i do here?

0057.00 C     KEYLIST       CHAIN     CUST                               91             140916                                      
0058.00 C                   IF        *IN91=*ON                                         140917                                      
0059.00 C                   EVAL      ERRLIN=ERR2                                       140917                                      
0060.00 C                   EVAL      *IN90=*ON                                         140917                                      
 Columns . . . :    6  80                                       Edit                                                USER224/QRPGSRC
0060.01 C                   ELSE                                                        140924                                      
0060.02 C                   EXSR      ADDSCREEN                                         140924                                      
0060.03 C                   ENDIF                                                       140924                                      
0065.00 C                   ENDSR                                                       140917
mustish1Author Commented:
Also why I have to use indicator 90, 91, 92 and 93. Can I choose any number?

Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Dave FordSoftware Developer / Database AdministratorCommented:
You can use any indicator-number you want (so long as it's not used elsewhere in the program for some other purpose.

It's seriously been over a decade since I coded like that, so I don't remember which positions the indicator needs to be in. You'll have to read the manual for that.

The best option I can see for you is to fully move into this century and code it in free-form and eliminate the use of indicators altogether.

  chain fileKey MyTable;
  if %found;                
    do something;
    do something else;

Open in new window

mustish1Author Commented:
ok. it looks like easy to work. Can you please tell me do i just type /free at any column or I have to type at any special column? Also just type my code between free and end-free or is there any thing else it needs? Also can i use embeed SQL between free and end-free too

Dave FordSoftware Developer / Database AdministratorCommented:
I believe the /free and /end-free has to start in position 7. Beyond that, you just type your code in ... with a semi-colon (;) at the end of each line.

Free-format embedded SQL is supported in later OS versions, so that'll depend on which OS level you're at.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.