IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can we decalre 1000 Variable records in File Section


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mutthu_talluri

New User


Joined: 16 Jun 2005
Posts: 9

PostPosted: Fri Jul 22, 2005 9:14 am
Reply with quote

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
View user's profile Send private message
shobam

New User


Joined: 18 Jul 2005
Posts: 34
Location: CN

PostPosted: Fri Jul 22, 2005 10:39 am
Reply with quote

I guess the following link will answer your query.

http://publib.boulder.ibm.com/infocenter/pdthelp/index.jsp?topic=/com.ibm.entcobol3.doc/tpqsm28.htm
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Jul 22, 2005 8:14 pm
Reply with quote

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
View user's profile Send private message
Mutthu_talluri

New User


Joined: 16 Jun 2005
Posts: 9

PostPosted: Fri Jul 22, 2005 8:18 pm
Reply with quote

1000 different combinations.....

Regards
Mutthu
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Jul 22, 2005 8:28 pm
Reply with quote

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
View user's profile Send private message
thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Fri Jul 22, 2005 8:35 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jul 23, 2005 3:37 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top