I'm a bit rusty on my AS400-Fu... never really used it much honestly.
I have a report (or 5) on a system that I have access too... how would I go about locating said report(s) and more detailed information about them.
I'm not sure how the reports are generated (RPG, SQL, etc), but I have the name of the report and some other basic information.
I need to find the report so I can research the information and logic that creates it. From the database/table it pulls info from. To the selection criteria.
On windows and Linux I'd use stuff like find, search, file extension, file explorer, etc to find the file and get information about the file and associated processes and go from there. Can't seem to put my finger on search button for the AS400.
Edit: Ideas from below:
@JamesA
wrkobj *ALL/PBRP581* *PGM
Object Type Library Attribute Text
PBRP581 *PGM FCSOLIB RPGLE Outsourcing - Acct Placement
DSPPGM FCSOLIBD/PBRP581
Program PBRP581 in library FCSOLIBD not found.
To locate a program object for this report try the command
WRKOBJ *ALL/PBRP581* *PGM
.Once you locate the program object you can find more detailed information using the command
DSPPGM library/program
. It will identify the type of program as well as the location of the source code for an OPM (old) program:Program attribute . . : RPG
To view/edit the source code use
STRSEU SRCFILE(TEST1/QPGMSRC) SRCMBR(BATITEM)
.If the program is a modern
ILE
program you will have to hunt for the source code. Standard source file names areQRPGSRC
,QRPGLESRC
,QCBLSRC
etc. You can search for source files in all libraries with the commandDSPOBJD *ALL/QRPGSRC *FILE
.Use
WRKMBRPDM FILE(library/sourcefile)
to view all of the source members within a source file.If you've got a printed query, it's probably generated by a call to
RUNQRY QRY(YOURLIB/YOURQRY)
somewhere.Try going into
WRKQRY
and then in the Library field, put*LIBL
, then in the Query field, putPBRP581*
and do F4. This should list all queries beginning with PBRP581.If that brings back the queries you are after, then do a
5
by the query to view the query definition.