Page 1 of 1

different records in a file

PostPosted: Wed Mar 26, 2008 11:21 pm
by veronikaluv
I have something like this: PC
20
30
40
50
60
70
EF
I need to examin the sequentiality of these records-if they appear one after another regularly or there is something missing (each of them are recs of different length, eg. REC20 has
filler pc x, tp-rec pic x(2), val-1 pic x(4) and so on...). It should all be down one 01 level, is it possible to make a table with occurs inside or how to do it? Thanks in advance.

Re: different records in a file

PostPosted: Wed Mar 26, 2008 11:59 pm
by dick scherrer
Hello,

Please clarify what you are asking. From what you've posted, your request is not at all clear.

if they appear one after another regularly or there is something missing
What does this mean? How would the code know if something was missing? The "keys" you posted all have values "missing" between themself and the "next" key.

How would you want to use an array?

Once your request is clear, i'm sure someone will be able to offer suggestions.

Re: different records in a file

PostPosted: Fri Mar 28, 2008 4:48 pm
by veronikaluv
on the end I should make a printing file that prints these data.
I have an array or a record set:
PC
10
20
30
50
70
10
20
30
50
70
.
.
.
.
ef

where for eg 10 is: rec10
filler x(1)
tp-rec pic x(2)
field1 x(5)
field2 x(5)
field3 x(12)

other rec20, rec30 ecc are with different lengths but they all start with Filler x(1).
I need to read all the array and verify if after 10 comes 20 , after 20 comes 30, and so on . If there is one of these recs is missing, need to inform a user about it, and then to print out a file with everything written in certain rows.

Re: different records in a file

PostPosted: Fri Mar 28, 2008 11:33 pm
by dick scherrer
Hello,

You seem to be reluctant to post much detail. . . For us to be able to actually help, we really do need a complete explanaton of what you have and what you want to do with it.

Examples (with more than 2-digits of detail) will help explain your requirement. . . You do not need to post all of the detail from all of the record types, but you do need to post enough for someone to understand your requirement.

Keep in mind that while your question is completely clear to you, it will probably not be so clear to others who read it.

on the end I should make a printing file that prints these data.
What is this? Who/what are "these data"?

I have an array or a record set. . .
I need to read all the array
Is there a set of records or is there an array (both?)? How is the array built? How many "sets" of data might there be in the input?

and then to print out a file with everything written in certain rows.
Show how this should be output.

When you post sufficient detail, we will try to suggest ways to get what you need from a process.