Reread records from physical file by Array

380 pts.
Tags:
AS/400
AS/400 Arrays
how to rerad the records from physical file by array .give me code.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Here is the basic code.
<pre>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 </pre>
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.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 421
    thanks pradeep
    380 pointsBadges:
    report
  • 421
    hi pradeep it dsply the only character type data only
    380 pointsBadges:
    report
  • pdsathishkumar
    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,790 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following