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

Q. What is the best way using D-specs to define a data area, where I want to get the value from the data area and never lock the data area? We use a data area to hold an encryption key. Other programmers are using the old *DTAARA DEFINE, directly followed by an UNLOCK because they say the D-specs can’t handle it without locking the data area. Is there a better way?

Q. Your RPG for RPG Programmers presentation covered the ILE debugger for interactive jobs. But I need to debug a batch program. Do I need a different debugger?

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.)

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.