Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us