Category: <span>FAQs and Tips</span>

Q. I am converting an existing application to use the INDDS data structure function. If I have multiple screens defined in a single DDS workstation file, the indicators on different screens might mean different things. Could be command keys or maybe different fields, subfiles… Can I have the data structure remapped for every screen or some way to remap over the indicator in indicator data structure?

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?

Q. We have utilities that do a DSPOBJD to an output file. We then read this output file into a query specifically looking at the source file library, source file change date, and source file change time. This works on OPM programs but I cannot seem to get the same information on ILE programs. I’ve tried DSPOBJD and DSPPGM. Ideally I would want this information in an output file but if I have to do *PRINT and CPYSPLF I will. Do you know of any command that offers this for me? The most I’ve been able to come up with is program creation date; not source file change date.

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.