1⟩ In RPG program one file using as a PRIMARY file while running program some of the records reading twice any body know why its happening?
This will happen if there is any duplicate records in
physical file..
“IBM AS400 frequently Asked Questions in various IBM AS400 job Interviews by interviewer. Get preparation of IBM AS400 job interview”
This will happen if there is any duplicate records in
physical file..
All RTV* commands can be executed at CLP but cannot be
executed at RPG.
In RPGLE if you want to declare the same file in more then
once mode(read/write/update)in this case you can override
the file with different name and declare the same file with
the overriden name.
for example:
In RPGLE if you want to open a file A in two different mode
one is Read and other is Update then you can override the
same file with two different name may be AA and AB and then
declare in your RPGLE program.
There is no comparison between DO and ITER as DO statement
is an looping statement and ITER is an branching statement
like LEAVE.
When I use ITER with some condition inside a DO-ENDDO loop,
when that condition occouerd, ITER transferred the control
to ENDDO not out of the loop like LEAVE ie it just skip the
execution of statements between ITER and ENDDO.
In one statement we can say that ITER in RPGLE is same as
CONTINUE in C.
Actually the file ABCD may have the record format name is
same as that of the file name. That is the reason why u r
getting this error.
RPGLE wont allow to declare a file with same name as record
format name.
So, to solve the problam u can change the record format
name other than the file name.
OR
U can use the RENAME keyword in the file specification to
change the record format name.
This can be done using the Key Field.
KEY1(NAME FIELD) SETLL FILENAME
KEY1(NAME FILED) READE FILENAME
READC is used to read the changed records in the subfile. But the catch is, it cannot read the same records twice. To overcome this situation, use SFLNXTCHG.
dsppfm & runqry
While loading the sub file we can simply increase the value of rrn or we can do this by using SFLINZ
we suppose to select SFLDSPCTL with N option in SFL.
EX : goto strsda - select sflctl take opt 8 and then enter - select all general keywords with perameter Y and then next window will open there we can see the SFLDSPCTL, Here we can follow above steps.
Testn opcode will the check data type in result field like if we have result field is character then only character data type will move to this otherwise it will through the error
Command attention will not return any data from the screen to the program. Command function returns date from the screen to the program.