View previous topic :: View next topic
|
Author |
Message |
Mutthu_talluri
New User
Joined: 16 Jun 2005 Posts: 9
|
|
|
|
Hi all,
I have 1000 variable records in my file. Can any tell me that, how can we decalre in File Section.
Please give me some detail explanation with example...
Thanks&Regards,
Mutthu. |
|
Back to top |
|
|
shobam
New User
Joined: 18 Jul 2005 Posts: 34 Location: CN
|
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Is '1000' the record count or are you saying that the file contains records with '1000' different combinations of varying fields in the reocrd layout?
Dave |
|
Back to top |
|
|
Mutthu_talluri
New User
Joined: 16 Jun 2005 Posts: 9
|
|
|
|
1000 different combinations.....
Regards
Mutthu |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
shobam's msg above will point you in the right direction
you may also create the layouts in working storage and use REDEFINES at the 01 level or some sublevel after the common fields are defined (if there are indeed a string of common fields).
In any case, some method of record identification must be in a field or combination of fields in order to know which fields get referenced for each record type.
Dave |
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
you can redifines each record
for exam ple my file has two different combinations
fd filename
o1 frec1.
02 empno pic s9(4).
02 empname pic x(20).
01 frec2 redefines frec1.
02 deptn pic 9(4).
02 deptname pic x(15).
02 sal pic 9(6).
thanooz |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Do not use redefines in the FD at the 01 level. It's not allowed. Just code multiple 01 entries with different defs.
BTW, how will you determine which of the 1000 types you just read? |
|
Back to top |
|
|
|