310 pts.
3,355 pts.

Answer Wiki:
Here is the basic code.
FTESTPF    IT   F    6        DISK                                     
DArray1 S 6A DIM(6) FROMFILE(TESTPF)
DI S 2P 0 INZ(1)
C Do 6
C Array1(I) Dsply
C Eval I = I + 1
C EndDo
C SETON LR

The above Code will read the records from Physical file(TESTPF) through array and display.
You can use the Similar concept(FROMFILE with Array) in performing your Operations.

Pradeep.
Last Wiki Answer Submitted:  Feb 7, 2012  6:42 AM (GMT)  by  Deepu9321   3,355 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _




 

thanks pradeep

 310 pts.

 

hi pradeep
it dsply the only character type data only

 310 pts.

 

if you want to display numeric data to change your coding like

Darray1 s 6p 0 dim(6) fromfile(arry) extfmt(p)
only for numeric data retrieve…

otherwise if you want to display both numeric and character refer this link.
.

 3,665 pts.

 

how to rerad the records from physical file by array

Please describe what you want to do.

Do you want to read records from a file and store data from those records in an array, and then use the array to read the same records a second time?

Or do you want to read records from a file into an array, and then use the array to access the data later?

If you describe the business problem, it should be possible to help you.

Tom

 66,990 pts.