Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

View Source File

Posted on 2008-06-17
3
Medium Priority
?
2,324 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 200 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

926 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