× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Once again I am running into some newbie problems.
-snip-
The SQLRPGLE program compiles but it bombs out
> when I try and run it.

Several steps to take:
1) Look at the job log. Use F10 to see the detailed messages and use F1 (help) on each one. OS400 may issue diagnostic messages before issuing the 'I died' escape message. They are all important.

2) When asking for assistance, post the error message. 'Bombs out' is a bit vague :-)

3) When asking for assistance, post what you tried so the list doesn't spend time telling you to try x when you've already done x.

4) If you didn't get an error message, post what you expected to see, and what you actually saw. The list can give you higher quality answers that way.

Some thoughts on the posted code:
I'm guessing you wanted to use LIKEREC to define the subfields of your data structure. That required you to define ITEM_PF on the F specs. There is another keyword you can use instead, which will allow you to eliminate the ITEM_PF F spec. Look up externally defined data structures in the RPG manual. (It's important to get used to the two RPG books, because we all use them. Often.) http://www.iseries.ibm.com/infocenter

%found only works with native I/O, and if your intent is to use SQL, you won't want to do native I/O as well. :-) There is an SQL reserved word that might help you determine how many rows were returned. Look up SQLER3 in the SQL book in the Database tasks of the Infocenter. I'm being deliberately vague so you can get the practice of looking it up. I download the PDFs so I can look them up pretty quickly. Another place to look is the compiler listing of your program. Pay special attention to the informational messages (there's a summary at the bottom.) My favourite part is the cross reference, but I'm a bit of a geek that way... :-)

I hope this doesn't come across harshly, but it's very difficult to teach fundamentals via email. You're doing the right thing by trying first, so keep on plugging and it will become more familiar. Do try to get used to the Infocenter though. If a search doesn't cut it, try the navigation tree on the left.
  --buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.