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)?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

can you debug ile rpg program using isdb?

965


How to select highest score of each subject or how to select highest income of every month?

1522


How can we know running job is batch or interactive?

890


Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

2284


what is program status data structure?

1849


What is the difference between copybooks and subprocedures in as400?

1107


can I touch the array during treatments?

965


what are the key words you must use when using a subfile?

909


How to declare the pull button in AS/400..

2135


How would display prime numbers using CL program?

5985


is this a rpg channel?

920


what is data area and how it is used in rpg program ?

1052


how do I preserve and clean the array?

874


How can we override a file during runtime in rpg?

946


are there any useful c runtime apis that I can call from rpg iv?

934