|
On 10/30/2015 10:38 AM, Justin Taylor wrote:
I have a non externally-described PF that contains two 50 element
arrays, but they alternate.
Example:
I P 11 14 0C1(1)
I 16 17 0Q1(1)
I P 18 21 0C1(2)
I 23 24 0Q1(2)
I P 25 28 0C1(3)
I 30 31 0Q1(3)
I P 32 35 0C1(4)
I 37 38 0Q1(4)
I P 39 42 0C1(5)
I 44 45 0Q1(5)
I need to declare this PF in a procedure, but I'm not sure the best
way to do it. Any suggestions?
You can define a data structure like this, and then code this data
structure as the result field of your READ operation.
dcl-ds ds;
elem dim(50) pos(11);
c1 packed(7) overlay(elem:*next);
q1 char(2) overlay(elem:*next);
end-ds;
Here's the fixed-form version of the DS.
D ds ds
D elem overlay(ds : 11) dim(50)
D c1 7p 0 overlay(elem : *next)
D q1 2a overlay(elem : *next)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.