Solved

View Source File

Posted on 2008-06-17
3
2,083 Views
Last Modified: 2012-08-14
We have a program in our AS400 that is scheduled to run every night to backup User data. I want to view the source code within the file. I simply want to look at it but for the life of me I dont know how. I dont want to edit or change anything, just look at it. Could anyone please give me a hand with this? I know this is very simple but I am not too proficient in the AS400.
0
Comment
Question by:rxmijares
3 Comments
 
LVL 16

Accepted Solution

by:
theo kouwenhoven earned 50 total points
ID: 21804288
Hi rxmijares,

If you know where the source is, and you don't have any experience with as/400
the most simple way is QRY

Just type on a command line :

RUNQRY QRYFILE((LibraryName/FileName ProgramName ))

File nam is possible QCLSRC

Other wise start PDM with STRDPM choos option 3,
Fill the fields on the screen and press enter,
now you can use Option 5 in front of a program to view the contents.

GoodLuck,
Murph
0
 
LVL 4

Expert Comment

by:rward
ID: 21804598
Sometimes you can find out where the source file for the compiled program is by using the DSPPGM command.

Example would be:  DSPPGM PGM(mypgm) DETAIL(*MODULE)   then use option 5 to display the module information. In the module attributes it will show the source file, library, and member the module was compiled from.

If the program isn't an ILE program then just running DSPPGM PGM(mypgm) will display the source file,lib,member that was used to compile.

Once you've got the source file you can use the STRSEU command to display the source.
example:  STRSEU SRCFILE(MYLIB/QRPGLESRC) SRCMBR(MYPGM) OPTION(5)   or  WRKMBRPDM FILE(QGPL/QRPLESRC) MBR(MYPGM) then option 5
0
 

Author Closing Comment

by:rxmijares
ID: 31467979
I used STRPDM and entered QCLSRC as the file name and was able to see it. Thank you.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question