Solved

View Source File

Posted on 2008-06-17
3
1,997 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now