If there are 1000 member(PGM type) in a SRC file. How can we
compile in a CL program? ( It need to be done in a loop)?



If there are 1000 member(PGM type) in a SRC file. How can we compile in a CL program? ( It need to..

Answer / abhishek

Please follow steps given below -

Use DSPFD command to take member list of SRC source
physical file into a PF
DSPFD FILE(LIBRARY/SRC) TYPE(*MBRLIST) OUTPUT(*OUTFILE)
FILEATR(*PF) OUTFILE(LIBRARY/OUTFILE)

It will create an OUTFILE into specified LIBRARY having
MEMBER LIST (filed name MLNAME). Now use this OUTFILE into
CL program reading it into loop till EOF(CPF0864) and for
each record, compile program using CRTPGM command.

CRTPGM PGM(&MLNAME) ......etc.

I hope it will
work.

Is This Answer Correct ?    17 Yes 1 No

Post New Answer

More RPG400 Interview Questions

How do you find whether a record is locked or not?

2 Answers  


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

0 Answers  


wat is meant by hidden field , why it is used?

4 Answers   Four soft,


In a particular program one file is used where override command is applied to a file, now this program calls another program where we want to use the same file but without override.How it can be done?

6 Answers   Hexaware,


what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?

4 Answers  






how do I play {insert rpg system here}?

0 Answers   IBM,


what is ment by "MDT"

2 Answers   TCS,


1.I have a Physical file with 100 records, No duplicates exists, all are Unique,But while i am running Runqry utility i am getting only 80 records..What could be the reason?

3 Answers   Cap Gemini,


how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE

3 Answers   iGate,


we are sending data of physical file to screen design and it is showing no record why?

1 Answers   NTT Data,


How can we find out whether the job is interactive or Batch through RPG program? 2) How can we find out through CL program?

6 Answers   CSC,


How to read data from Nth member of a physical file containing some X number of members in it? "Provided member names are unknown"

4 Answers  


Categories