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

is their a difference in cobol400 for the release 5.2 and 6.1 at the as400.

2319


Pose, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular name field. How can we do the above using search criteria other than using the if cond?

824


what are the three line types in rlu ?

1823


how do u compile rpgle program?

845


what is the maximum number of fields under a record format of physical file?

1373


what is the difference between udate and the system date?

1543


Difference between NOPASS & OMIT?

1522


define the purpose/use for sflrna?

1350


what is a join logical file?

963


how do you use commitment control in rpg program ?

1664


What Is Default Data Type (if You Define Decimals '0') In Physical File?

1543


WHAT IS AS/400 SYNORIO?

3097


how can you detect overflow for a print program that prints multiple lines per cycle?

1336


can a single screen format occupy a screen area above and below a subfile format ?

1327


define the purpose of the iter operation?

1428