1.Suppose my file has 10 fields and I want to make the 2nd
field Zeros in all records. And assume I have millions of
records and I dont want to read each record and update the
desired field with 0. Any other way to do this in one step
operation?
2. Assume my file has 100 records and I want to see only
first 10 records. Is this possible through LF?
3.I have 3 jobs A B and C. I want to submit B after
successful completion of A and want to submit C after
successful completion of B. Without using job scheduler or
job queue, how can i do that through CL program?
4.What is difference between Bind by copy and bind by reference?
Answer Posted / raj
1. STRSQL give UPDATE cmd and take f4 in where condition fld2=*zeros
2. copy first 10 recods to another file BY using CPYF GIVE RUNARY
(OR)
fld2 read file 50
*in50 doweq *off
add 1 a 20
if a>=11
leave
endif
read file 50
enddo
(or)
read the records one by one if it cross 11th record give LEAVE opcode.
4. bind by copy: here module will static
bind by reference: here module will be dynamic.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
how do I declare a table or array in rpg iv?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
what is the difference between do while and do until?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
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?
how can I tell when to replace the array?
How to handle duplicate error handling in RPG?
can I touch the array during treatments?
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 call one program from another program in RPG? please help me with the code
what is file information data structure?
can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com
what is program status data structure?
how do I play {insert rpg system here}?
How can we know running job is batch or interactive?