Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

937


how can you display specific subfile page on the screen in unequal subfile?

1129


what do you mean by an input subfile, what are the keywords required?

1238


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.

1199


how can I tell when to replace the array?

1193


what is the use of sflnxtchg?

1239


how do I play {insert rpg system here}?

1017


What is ment by record level identifier?

1127


What is the difference between copybooks and subprocedures in as400?

1338


What is a record lock error?

1749


Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

930


How to call one program from another program in RPG? please help me with the code

1704


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1703


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

2976


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

1902