|
|||||||
|
|
![]() |
|
|
|
|
||
|
Odds and Ends Dear Readers: Here are more miscellaneous tips and techniques. These are in response to short questions you've sent in. --Ted Question: The Display Program (DSPPGM) command shows us the name modification time of the source member from which an OPM program was compiled. How do we get the same information for an ILE RPG program? Answer: Under ILE, a source member is compiled into a module. Modules are combined to form programs. As I heard one wag say that ILE means it's a "linkage editor." The information you seek is available through the same DSPPGM command. Press Enter a couple of times, until you arrive at the screen 3. (At least it's screen 3 under V5R1.) You'll see the modules listed. Chances are there's only one. Option 5 shows the source member information. Question: How can I identify IBM objects that our shop has changed? Answer: Run the Display Object Description (DSPOBJD) command to build an outfile and look at the ODUMOD field. Changed objects have a value of 1. Unchanged objects have a value of 0. Question: I have an application where users place text files in QDLS folders. I use the QRYDOCLIB command to search through these folders for items to be processed. The results of the command are placed in the file. This file is then used as an input file to direct processing of the text files. Our users want to use the IFS, but the QRYDOCLIB only works with QDLS. Is there any way in a CL program to obtain the contents of an IFS folder and place the results in a text file that can be accessed by CL commands, or directly into an AS/400 file? Answer: Qshell can handle this task for you. Try this.
crtpf mylib/dirlist rcdlen(80)
qsh cmd ('ls >/qsys.lib/mylib.lib/dirlist.file/dirlist.mbr ')
Question: In the October 17, 2001, issue of Midrange Guru, you wrote about the system reply list ["Automatically Reply To Inquiry Messages"]. Can I use the same reply list to have the system automatically reply to the verify alignment message (CPA4002) on my AS/400 printers? If so, do I need to do anything else besides add an entry to the system reply list? Answer: Sure, that will work. You'll need to use the CMPDTA parameter if you only want to trap the message for certain printers. ADDRPYLE SEQNBR(xxxx) MSGID(CPA4002) CMPDTA(PRT05 41) RPY(G) This example shows how to automatically answer message CPA4002 for printer PRT05. To answer message CPA4002 for all printers, leave out the CMPDTA parameter. Question: One of our CL programs quit working properly not long ago. We finally found the bug. We had improperly defined a new parameter in an RPG program that is called from the CL. The called RPG program was overlaying a logical variable with a garbage value. Yet the CL program did not bomb. Why not? Answer: CL will not allow you to assign a value other than 0 or 1 to a logical variable. However, when CL tests a logical variable, it accepts a value of 1 as true and any other value as false. Question: Is there any way to print user ID in the header of a Query/400 report? Our users print many pages of queries but don't collect them. Since we use network printers, it is hard to know who prints each report. Answer: I don't know of any way to put the user ID in the query header, but you can put it at the bottom of the page if you wish. RTVJOBA USER(&USER) OVRPRTF FILE(QPQUPRFIL) PRTTXT(&USER) RUNQRY etc. You should also check into some of the report utilities on the market.
|
Editors
Contact the Editors |
| Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved. |