|
|
Q. I am trying to find out which user is causing a record lock. I should be able to get some basic information on the record lock by examining the exception data subfield in the Program Status Data Structure (PSDS). But instead of the promised "Record in use by job ..." data which actually names the job holding the lock, I get a more generic "Unable to allocate a record..." message.
What's up with that?
|
|
Read more ... Record Locking Problem in a Monitor Block
|
|
Q. We use a trigger program written by a former employee; it has started getting decimal data errors (RNQ0907 or MCH1202). My company recently upgraded to Version 5, but the program was working perfectly before that. No one here really understands triggers. Can you give me an example of an RPG IV trigger program that will work?
|
|
Read more ... Skeleton Trigger Program
|
|
Q. In fixed format RPG IV, I used the TIME operation code to get the current date and time; but TIME is not supported by free format. You mentioned that the %DATE, %TIME, and %TIMESTAMP functions can replace TIME, but I'm not sure how to use them for this purpose.
|
|
Read more ... Free Format Alternatives to TIME
|
|
|
It's common to use the QCMDEXC or QCAPCMD API when you want to execute a CL command from an RPG program. But you may find it more convenient to use a C runtime library function, system(), to accomplish the same purpose. The system() function will pass a command string to the command processor, without the need to pass the length of the command string, or any other parameters for that matter.
|
|
Read more ... Executing Commands with system() Function
|
|
Q: In your RPG IV Modules, Procedures & Service Programs presentation, there is an example showing how to use QCMDEXC in a prototype. If an error occurred while executing this code is there a way to handle it internally?
|
|
Read more ... Error handling with QCMDEXC
|
|
Q: I recently ran into a problem with the %LOOKUP function (both in free and in fixed format). A converted program (which had originally used the LOOKUP operation) was using %LOOKUP on an array that was set up as ASCENDING. When the lookup occurred, no element was found. When I removed the ASCENDING keyword, the lookup word fine. Any ideas?
|
|
Read more ... %LOOKUP Function with ASCEND
|
|
Q. I have programs that sometimes force a field defined larger than the result field. Of course I get the RNQ0103 message ("Target for a numeric operation is too small to hold result"). Is there a work-around or am I forced to end-free and do this operation and return to free?
|
|
Read more ... Receiver Too Small to Hold Result
|
|
|
Q. I understand how to prototype a program call, using EXTPGM and naming the program. But I want to allow the user to select an item from a subfile, then have the program use that selection to choose one from among several different possible programs to run. Is there a way to do this?
|
|
Read more ... Using CALLP with a Variable Program Name
|
|
Q. I read your tip about using CALLP with a variable program name. I want to do something similar, but with procedures. I want a program to choose one from among several different possible procedures to run, depending upon the contents of a database field. Is there a way to do this with CALLP?
|
|
Read more ... Using CALLP with a Procedure Pointer
|
|
Q. I've heard you say that I can pass a data structure as a parameter, or accept it as a return value. How do I do this?
|
|
Read more ... Prototyping Data Structures
|
|
Q. How can I assign a null value to a table column using embedded SQL? The RPG %Nullind function doesn't seem to work for an SQL Update or Insert statement.
|
|
Read more ... Embedded SQL and Nulls
|
|
|
|
|
<< Start < Prev 1 2 3 4 Next > End >>
|
|
Page 1 of 4 |