I’M UNABLE TO COMPILE RPGLE SOURCE

75 pts.
Tags:
AS/400
RPGLE
Source code
Hi All,

In my application there is program in ILE source, code like bellow,

I/COPY CMQGMOG                               ** note, sample uses defaults where it can  *                                           * misc fields added by me                  D INDX            S             10I 0      

When i'm creating a module getting error beelow,"Compiler not able to open the /COPY or /INCLUDE file; "

Could you please some one let me know,

1. Can I use I spec in ILE SOURCE CODE?

2.Can I use the copy source in I spec?

3. This is allready exsting program, there are created the module before with same source code,

Please let my how can I compile this source code.

Venky.........

 

 

ASKED: June 15, 2010  3:41 PM
UPDATED: June 29, 2010  11:49 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

If this is an existing program that was compiled on your system, then somewhere there is a source member named CMQGMOG
If it is not compiling for you, then whatever library that files resides in is not in your library list.
I would do WRKF *ALL/QCPYSRC and then use PDM or Ops Nav to look at the members in each of the files you find. If you find the member, the add that library to you LIBLST before you submit your compile.

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    The error is most likely RNF0273. Did you look at the message text to see the explanation? Did you follow the instructions in the message? Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Until the source member (or IFS streamfile) is located, the proper correction is unknown. Since the /COPY statement does not provide a source file name, the compiler expects the source file either to be QRPGLESRC in the library list of the job running the compile or to be a streamfile in the include search path. (If it's a streamfile, the actual name might also be CMQGMOG.rpgle or CMQGMOG.rpgleinc.) Details such as those are why control needs to be maintained over source. Tom
    125,585 pointsBadges:
    report
  • VENKYAS400
    CharliBrowne,and Tom, Thank you for your valuable informatiom, Could you please let what my doubt is how are they compiled previously? Thanks Venky
    75 pointsBadges:
    report
  • Flopster
    When including source it is best to use a conditioned include as follows: /if Not Defined(SourceMemberName) /Define SourceMemberName /Include SourceFileName,SourceMemberName /endIf Doing it this way will prevent conflicts with programs which already include the member.
    265 pointsBadges:
    report
  • TomLiotta
    ...how are they compiled previously? The program was probably compiled in a job that had the correct library list. Possibly the CRTxxx command that was used had the INCDIR() parameter set. There is no way for us to know. If the module was compiled with a *LIST debug view, you should be able to read the listing by issuing STRDBG for the program. The listing view should include lines that tell you where the /COPY member was found. If there is no debug *LIST view, then you will have to look at every member in every QRPGLESRC source file on your system. If the member isn't in one of those files, then you'll have to search the IFS for a streamfile of that name. (Technically, it could even be on some other system in your network -- including PCs and Unix systems.) Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    ...compiled with a *LIST debug view, you should be able to read the listing by issuing STRDBG for the program. BTW, IMO, that is a reason always to include at least DBGVIEW(*LIST) for all in-house production programs. The increase in size is a small price to pay. Tom
    125,585 pointsBadges:
    report
  • VGP
    Hi, I worked at a shop that did not use the QRPGLESRC but TSRC if the program began with a T and DSRC if the program began with a D, etc. For both the /Include and the /copy the dsppgm command shows what the source file was used on compile and what library it was found in. You have to hit enter several times to get to the object needed and put a 5 to display. Yes, they specified the TSRC or DSRC. And the programs that use the QRPGLESRC did not use the copy or include statements. Sounds like a huge project to find the proper library with searching all source files but I use the option 25 search in PDM a lot. Use option 2 for objects and put the 25 on the QRPGLESRC and specify the CMQGMOG on the search line. Better than looking at each member separately. Good luck, Gail
    300 pointsBadges:
    report
  • TomLiotta
    Sounds like a huge project to find the proper library with searching all source files If I have a development system (or partition), I run a job nightly the builds a list of members in every source file on that system. I can then use a simple SQL statement:
    SELECT * FROM srcmbr WHERE MBNAME = '<mbrname>'
    ...to locate any/all members of that name. On current iSeries systems, the list building is quick. (I used to do it every weekend or even monthly.) I also regularly run a job that runs DSPPGMREF for *PGMs, *SRVPGMs and *SQLPKGs into an outfile. Simple SQL statements help locate various references. And I can submit a job that calls QBNLPGMI to retrieve *MODULE lists for each *PGM in a library -- this job can add to the list for multiple libraries or replace the list for a fresh start. I try to automate as much as possible. The system exists to serve, so I use it to do a lot of my work. Tom
    125,585 pointsBadges:
    report
  • Rudedog
    find the /copy member in quesiton, and use CvtRpgSrc (Convert RPG Source) on the /copy member and place it in either the QRPGLESRC file, or change the line of code to point to where the actual /copy member exists. -sarge
    950 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following