Compile Issue with Cusor Loction Solution


This is related to my prior question on RPG36 Cursor location on a Screen.

I finally got a change to try the program Tom posted (thank you). I'm unable compile it. I've attached a listing. No Errors, but not compile.

At first I was getting  * CPD0726 10  Variable declared but not referred to.  &      
                                   * CPD0791 00  No labels used in program.  I removed the variables and put a dummy label at the bottom. (I did some looking any it appears there is a PTF related to the label error.)

Any suggestion would be greatly appreciated.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Gary PattersonVP Technology / Senior Consultant Commented:
Answered in the other question.  Suggest you delete this one.
Both messages are only informational warnings. The program would compile fine of those were the only messages. However, in review, I see that the coding style is older and could be modernized a little. Here's a version for current versions of the OS:
pgm    ( +
         &pRow        +
         &pColumn     +

   dcl   &pRow        *char    4
   dcl   &pColumn     *char    4

   dcl   &DecVal      *dec  (  4 0 )

   dcl   &Row         *int
   dcl   &Column      *int
   dcl   &hLoLvlEnv   *int           value( 0 )
   dcl   &ErrCod      *char    8     value( x'0000000000000000' )
   dcl   &RtnVal      *int

   callprc 'QsnGetCsrAdr'   ( +
                              &Row         +
                              &Column      +
                              &hLoLvlEnv   +
                              &ErrCod      +
                            ) +
                      rtnval( &RtnVal )

   chgvar         &DecVal              &Row
   chgvar         &pRow                &DecVal

   chgvar         &DecVal              &Column
   chgvar         &pColumn             &DecVal



Open in new window

You can add a label if you think one is necessary.

I see one critical change from the original in your compiler listing. This line:

Open in new window

If you look at the joblog from the compile, you should an error indicating that symbol 'QSNGETCSRADR' could not be resolved. That's because the actual name is 'QsnGetCsrAdr'. Quoted procedure names are case-sensitive.

The ILE CL compiler should find the procedure in a system-supplied service program, but the name does need to be corrected. And be sure to set the source member type to 'CLLE' if you're using PDM to run the compile. The creation command will be CRTBNDCL.


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
Gary PattersonVP Technology / Senior Consultant Commented:
Lol.  Didn't notice this was CLLE!  Answered in other thread as if it was RPG.  Glad Tom is paying attention, at least.
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.