|
|
Q: We are chaining to a file that has two record formats. We use the record format in factor 2 instead of the file name. When we try to use the %FOUND function (or NOT %FOUND), we get an RPG compile error: RNF0394 The parameter is not valid for built-in function %FOUND. Are we doing something wrong? Surely you can use the record format name on the chain?
|
|
Read more ... Using %FOUND with CHAIN
|
|
Q. While maintaining a large RPG IV program, I added an indicator data structure, using the INDDS keyword for the workstation file. I also added the INDARA keyword to the DDS, as required, and recompiled the file. But now the program doesn't work. What did I do wrong? (The program is over 3,000 lines, and I do not want to change everything to use the new indicator data structure.)
|
|
Read more ... Converting Legacy Code to Named Indicators
|
|
|
Q. I guess I've misinterpreted how %DEC is supposed to work. In the following example, the value in Char4 is 0250, so I was anticipating the same result as a Move operation -- with my numeric result as 4 long, 3 decimal positions. But I get the error "The target for a numeric operation is too small to hold the result."
Num43 = %Dec(Char4:4:3);
Do you have a simple solution?
|
|
Read more ... Numeric target too small when using %DEC
|
|
Q. If I use the scheduling parameters (SCDDATE and SCDTIME) on the SBMJOB command, and the system is down during the scheduled time (power failure, IPL, etc), will the job automatically run when the system comes up?
|
|
Read more ... SBMJOB Command Scheduling Parameters
|
|
The RPG IV language introduces several powerful built-in functions that simplify string-handling requirements. You can add a few more string-related procedures to come up with a complete toolbox for processing text. The Centertext procedure centers a string field, a function that's handy for centering headings on reports and displays.
|
|
Read more ... Centering a Text String
|
|
Q. You've recommended placing prototype (PR) definitions in copybook(s), then using /COPY to copy the prototypes into the modules that need them. At our company, some programmers place not only the prototypes in copybooks but also the procedure interface (PI) definitions too. Could there ever be a good reason to do this?
|
|
Read more ... Using /COPY for Prototypes
|
|
|
Q: When I try the following operation:
eval %subarr(*in:50:5) = '00000';
I get the following compile error: "The expression is not valid for assignment to an indicator or indicator data structure." I get the same error when I try it without the 3rd parameter as
eval %subarr(*in:50) = '00000';
|
|
Read more ... %SUBARR Problem with Indicators
|
|
Q. I'm trying to use free format RPG IV, but the editor keeps giving me the following error: The File-Type entry is blank or is not I, O, U, or C. What am I doing wrong?
|
|
Read more ... Seven Rules of Free Format RPG
|
|
Q. I work in a shop where service programs and binding directories traditionally have a one-to-one relationship (that is, there is a binding directory for each service program). My preferred approach is service programs with functions related to a business area in a binding directory, then maybe two or three binding directories that cross business areas.
From this scheme it appears we would reduce the amount of time we spend managing our objects. Remembering that we try to keep the functions small, we should not create a lot of "code bloat"; should be able to avoid loading a lot of functionality that is not useful.
|
|
Read more ... Binding Directory Organization
|
|
Q. I'm trying to replace the *ENTRY PLIST with a prototype, so I can use CALLP and free format. But I'm running into a problem with the LIKE keyword. The compiler is giving me the following error: "LIKE not allowed with specified Field-Location entries; keyword is ignored."
|
|
Read more ... Prototype Problem with LIKE
|
|
|
|
|
<< Start < Prev 1 2 3 4 Next > End >>
|
|
Page 2 of 4 |