Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Why we cannot call a service program? If I add a PEP can i call the service program?

1 Answers   DELL,


1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using composite key which rpg code used?

3 Answers   HSBC,


Can you copy the records created by the OPNQRYF to other files and how?

2 Answers  


What is ment by record level identifier?

0 Answers  


I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?

2 Answers  






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

2 Answers  


Delete FileName at first statement in RPG.

1 Answers  


What is the OPEN and CLOSE accesspath?

3 Answers   CTS,


1.The questions have given an array declaration and move operation then this statement is correct or not?

3 Answers   TCS,


what are the parameters of jobd?give in detail.&what are the parameters of subsystem...????

1 Answers   CTS,


i have 1000 records in pf.what are all the ways to read a particular name records in rpg?? ie.. in pf i have a name called demo appeared around 52 times hw will we read this particular records in rpg/400?.

11 Answers   IBM,


What is the significance of UDATE?

5 Answers   IBM,






Categories