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 |
Write the subfile logic program for the given concept. Load the data to the subfile depends upon the designation where designation is not a key field?
How to search particular records from the database file in rpg?
what are the key words you must use when using a subfile?
How would display prime numbers using CL program?
Mr.Yallamanda Reddy P thanks for your answer sir,can we use test(D) opcode in RPG/400,if yes please help me by eloborating on that answer by writing a sample code for that sir
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?
I have a Physical File name 'File1', which is present in two libraries named 'LIB1' & 'LIB2'. These 2 libraries are listed in the library list. Would like to access data from this file from these two libraries using RPG program. How to do this, any idea?
what are the array operations?
1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?
wat is the difference between array and multiple occurence data structure?
1.Write code to read the records from a file and load an array of size 99? Make sure that you take care of all the error conditions?
How can we receive values from a called procedure in CL?