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?

Answer Posted / amuthavalli

Its better to keep all the designations in Compile time
array.And then compare the Physical file datas with the
array(designation).Then write it into a subfile.

read file1
Dow not %eof
Move designation arr(i)
add 1 to i
read file1
enddo

dow j<=i

Read file2
dow not %eof
If arr(j=designation
write subfile
endif
Read file2
enddo

Add 1 to j
Enddo

This logic will work.Try it out.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how you will know whether you are in sfldrop or sflfold mode?

627


what would be the effect on the field where reverse image, underline and highlight display attributes were active?

933


what is the sequence when using cursor?

605


how to read database records without locking them?

1141


how do you use commitment control in rpg program ?

1277






1)In a pf if we delete a record then how to insert a new record at the same place in that pf?? any logic or code? 2)A batch job is taking a lot of time to run,found that it is going into loop and wrapping up so how to skip that loop and process the job without changing the code? 3)In which scenario C D I R comes and C D G F comes in a job? 4)If a job came to error while processing a file how we can know at which record the error hit and how to skip that record and process other records without changing program code?

3064


what is *inzsr used for?

1469


what is a join logical file?

754


what is procedure prototype and procedure interface.

621


difference between view and index ?

711


which indicator is used for read?

626


Why we have multiple data types in As400 and why we use numeric, packed, decimal, zoned the basic difference between this?

607


which cl command is used to trap error messages during program execution?

863


What Is The Difference Between Goto & Exsr?

1171


in conjunction with what other keyword must ovrdta and ovrata be used?

910