|
I searched the RPG Archives for "FAQ" and included questions/answers I found
there.
This is to get the ball rolling. Who is willing to host this?
Regards,
Jim Langston
Me transmitte sursum, Caledoni!
RPG FAQ
Question: I am linking to some procedures in some modules, when are these
procedures loaded?
Answer: That depends on how the procedures are linked. If you are linking to a
service program,
then the compiler links the service program at compile time but does not load
it. At run time
the entire service program will be loaded. If you are not linking to a service
program, then
the procedures from the modules are copied into the program at compile time.
External Programs
are always loaded at run time.
---------------------
Question: I have fields defined as zoned in my file. But the compiler listing
reports them as
being packed. Why?
Answer: The RPG compiler will automatically convert ZONED data being input
from an externally
defined file into PACKED, unless you specifically tell it that you want your
field to be zoned.
This is not a new feature of RPG IV... It did this in RPG III as well. This
just didn't cause
many conflicts because ZONED was so rarely used in RPG III.
A simple workaround is to pull your file into an externally described data
structure. Add a line
similar to this:
D MyFileDS E DS ExtName(MYFILE)
Which will create a data structure with your externally defined fields, forcing
them to be the
attributes that you used in your DDS source.
---------------------
Question: When I pass numeric parameters to my RPG program from the command
line my program isn't
working as expected. Why?
Answer: The command line doesn't know what type of parameters it is trying to
pass, so it converts
all numeric variables into 15,5 before passing them.
Number of work arounds include:
Creating a command to call the RPG program, which will convert the numeric
variables to the length
declared in the command.
Pass the numeric values as character data (I.E. PARM('0009') rather than
PARM(9))
---------------------
Question: My CGI calls a CL which produces a report. The spooled file is under
job
"nnnnnn/QTMHHTP1/QPRTJOB". However RTVJOBA in the same CL returns the http
server
job info: "mmmmmm/QTMHHTTP/DEFAULT". How can I get the job info for the job
that
created the report?
Answer: The AS/400 does this by design. That way, your user can WRKSPLF and
see it.
If you want to have the spooled file belong to the original job, use OVRPRTF
SPLFOWN(*JOB)
---------------------
Question: How do I find the TCP/IP address of the AS/400 I am working on?
Answer: NETSTAT from PC or AS400.
---------------------
Question: How do I check a user's authority to files in the Root File System?
Answer: The Retrieve User Authority to Object (QSYRUSRA) API supports the
special
value *PUBLIC for the User profile name parameter. The List Users Authorized
to
Object (QSYLUSRA) API can also be used to determine public authority as the
first
entry returned in the list is for *PUBLIC. Both APIs are found in the Security
chapter of the System API Reference.
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.