Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Opening a file using copybook

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Opening a file using copybook
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: 1187
Location: Bangalore,India

PostPosted: Wed Sep 27, 2006 10:27 am    Post subject:
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    Post subject: Re: Opening a file using copybook
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us