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

what is file information data structure?

1317


explain sflclr, sflend, sfldlt, and sflcsrrrn?

844


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

1863


what is an online rpg?

693


How can we know running job is batch or interactive?

628






Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

1433


how do I play {insert rpg system here}?

560


can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.

2237


is this a rpg channel?

656


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

720


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

722


can I touch the array during treatments?

715


what is *place and *auto keyword in prtf ?plz explain

2693


What is the difference between iter and do?

643


Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?

4126