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 / 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 |
If record-format name in an externally-described file has already been defined as a file-name.how to solve this?
What are the types of identifiers?
How to write record if no field or the field are different in physical file in rpgle ?
this is rpg3 code W0RTN IFEQ @CN,002 what is the means @CN,002
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
How can we access Interactive job LDA in Batch Job?. and How we can access a file in interactive QTEMP lib in Batch job?.
What would be the result on writing a data record to a PF file using the "WRITE" opcode after the SETON *ON *INLR statment?
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
How to read data from Nth member of a physical file containing some X number of members in it? "Provided member names are unknown"
HOW TO DELETE THE RECORD FROM MASTER FILE WHICH IS LINK BY ANOTHER TRASATION FILE WITH REFERTIAL INTYGRITY?
Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?
How to call one program from another program in RPG? please help me with the code