Solved

View Source File

Posted on 2008-06-17
3
2,115 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

After-hours service is a fact of life for most MSPs. While not the most pleasant aspect of the job, there are ways to make after-hours servicing a more profitable and organized enterprise.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

713 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