0

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.
WernerCD
  • 344
  • 2
  • 6
  • 18

2 Answers2

2

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

Type of program  . . . . . . . . . . . . . . . . :   OPM
Source file  . . . . . . . . . . . . . . . . . . :   QPGMSRC 
Library  . . . . . . . . . . . . . . . . . . . :     TEST1 
Source member  . . . . . . . . . . . . . . . . . :   BATITEM1

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 are QRPGSRC, QRPGLESRC, QCBLSRC etc. You can search for source files in all libraries with the command DSPOBJD *ALL/QRPGSRC *FILE.

Use WRKMBRPDM FILE(library/sourcefile) to view all of the source members within a source file.

jamesallman
  • 695
  • 4
  • 11
0

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, put PBRP581* 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.

Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57
  • From above, I think I have an RPGLE, not a query. But using wrkqry + *LIBL, it does show me some stuff I might find usefull in other research areas – WernerCD Sep 13 '10 at 13:53