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.........
Software/Hardware used:
ASKED:
June 15, 2010 3:41 PM
UPDATED:
June 29, 2010 11:49 PM
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
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
CharliBrowne,and Tom,
Thank you for your valuable informatiom,
Could you please let what my doubt is how are they compiled previously?
Thanks
Venky
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.
…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
…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
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
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:
…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
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