I have an Easytrieve question using a VSAM File and an OutPUT File called Newfil2. I need to link these two files together. I can't seem to link them without getting a error message Invalid File Reference A010 for FileA. Please see formats and code below.
File FileA VS
K-code-num 89 3 P 0
K-code-prefix 92 1 A
Pack 93 2 P
BTL-RET 95 3 P 2
BTL-CST 98 3 P 2
KEYX W 4 A
Key1 KeyX 3 P
Key2 KeyX +1 1 A
File FileO
Ostore 1 3 N
Onumber 4 4 N
OAlpha 8 1 A
O-Litters 9 11 N 4
OBotsold 20 6 N
OLocation 26 18 A
Tot-Bottles W 6 P 0
Tot-Litters W 7 P 3
Total-Litters W 6 N
Job Input FileO
Read FileA Key KeyX Status
Key1 = K-code-num
Key2 = K-code-prefix
If Filea: File-status NE 0
Goto Job
Else
If Obotsold = 0
GoTo Job
end-if
Cost-sales = BTL-CSt * Obotsold
Bot-Retail-Cost = BTL-Ret * Obotsold
Total-Litters = o-Litters + o-Litters
Lit-sales = o-litters + Obotsold
End-if
I can't link FileO and the VSam File FileA
I have the wrong code somewhere.
Anybody out there, please help.
Thanks
jjc3397
File FileA VS
K-code-num 89 3 P 0
K-code-prefix 92 1 A
Pack 93 2 P
BTL-RET 95 3 P 2
BTL-CST 98 3 P 2
KEYX W 4 A
Key1 KeyX 3 P
Key2 KeyX +1 1 A
File FileO
Ostore 1 3 N
Onumber 4 4 N
OAlpha 8 1 A
O-Litters 9 11 N 4
OBotsold 20 6 N
OLocation 26 18 A
Tot-Bottles W 6 P 0
Tot-Litters W 7 P 3
Total-Litters W 6 N
Job Input FileO
Read FileA Key KeyX Status
Key1 = K-code-num
Key2 = K-code-prefix
If Filea: File-status NE 0
Goto Job
Else
If Obotsold = 0
GoTo Job
end-if
Cost-sales = BTL-CSt * Obotsold
Bot-Retail-Cost = BTL-Ret * Obotsold
Total-Litters = o-Litters + o-Litters
Lit-sales = o-litters + Obotsold
End-if
I can't link FileO and the VSam File FileA
I have the wrong code somewhere.
Anybody out there, please help.
Thanks
jjc3397