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

Opening a file using copybook


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

New User


Joined: 19 Jul 2006
Posts: 8

PostPosted: Wed Sep 27, 2006 6:43 am
Reply with quote

I have a file which is of lrecl=200 and we have 4 different types of copybooks to view it for a parituclar type of purpose for the same file.

Now my requirement is I need view the file using all the copybooks just like xref in file-aid. But we have file-manager in our shop.

Even I tried re-defines clause for all the copybooks, and it is not working.

Could anybody help me achieve this?

Thanks
Sri
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Sep 27, 2006 10:27 am
Reply with quote

It should work would you please tell me how u redefine it.
For example u have these two copybook COPYBK1 , COPYBK2

COPYBK1 Structure

Code:
 01  WS-VAR-COPYBK1.
    03 WS-VARIABLE.
       05  WS-VAR1         PIC 9(6).
       05  WS-VAR2         PIC 9(4).
       05  FILLER             PIC X(20).
       05  WS-VAR3         PIC X(10).
       05  WS-VAR4         PIC X(10).
       05  WS-VAR5         PIC X(15).
       05  WS-VAR6         PIC X(15). 

COPYBK2 Structure
Code:
01  WS-VAR-COPYBK2.
       05  WS-VAR7         PIC 9(10).
       05  WS-VAR8         PIC X(30).
       05  WS-VAR9         PIC X(10).
       05  WS-VAR10       PIC X(30).
Then U need to use redefine
Code:
   01  WS-VAR-COPYBK1.
    03 WS-VARIABLE.
       05  WS-VAR1         PIC 9(6).
       05  WS-VAR2         PIC 9(4).
       05  FILLER             PIC X(20).
       05  WS-VAR3         PIC X(10).
       05  WS-VAR4         PIC X(10).
       05  WS-VAR5         PIC X(15).
       05  WS-VAR6         PIC X(15). 
   03 WS-REDEFIN     REDEFINES WS-VARIABLE.
       05  WS-VAR7         PIC 9(10).
       05  WS-VAR8         PIC X(30).
       05  WS-VAR9         PIC X(10).
       05  WS-VAR10       PIC X(30).
Hope i make myself clear
Back to top
View user's profile Send private message
srinu14165
Warnings : 1

New User


Joined: 19 Jul 2006
Posts: 8

PostPosted: Thu Sep 28, 2006 6:37 am
Reply with quote

Ekta,
I thank you for the prompt response and thats the same thing
I did ,but onething I forgot is to create a template for this in file-manager and so it is not working.

Now I created a template for the 4 copybooks and it is working fine.

Thanks much
Sri
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Sep 29, 2006 4:08 am
Reply with quote

Reply deleted by author.
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 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
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top