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
 

 

How to map or use copybook without a fileaid?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
madlui56
Currently Banned

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jan 14, 2008 7:32 am    Post subject: How to map or use copybook without a fileaid?
Reply with quote

I know F1 or F2(fileaid) in using copybook for mapping. Does anyone know way without using fileaid.. Right now we have copybooks but I don't know how to use it without even using fileaid for mapping...

Help Appreciated.

Thanks.

Louie
AIGSI - Malaysia
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Jan 14, 2008 8:07 am    Post subject:
Reply with quote

Louie,

Quote:
I know F1 or F2(fileaid) in using copybook for mapping


Quote:
I don't know how to use it without even using fileaid for mapping...

Dint get you? Could you explain bit clearly.
Back to top
View user's profile Send private message
madlui56
Currently Banned

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jan 14, 2008 8:18 am    Post subject: Copybook
Reply with quote

we don't have fileaid that I usually used in mapping dataset to its copybook. My new work doesnt have fileaid such as f1 or f2 command to use copybook in mapping. the problem besides fileaid whats the mainframe capability of mapping or using a copybook to map a specific dataset? thanks

Louie
AIGSI- Malaysia
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Jan 14, 2008 8:24 am    Post subject:
Reply with quote

Quote:
besides fileaid whats the mainframe capability of mapping or using a copybook to map a specific dataset?

We need a tool (like fileaid/filemaster) for mapping copybook with dataset. Without these, I dont think you can map.
Back to top
View user's profile Send private message
madlui56
Currently Banned

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jan 14, 2008 8:27 am    Post subject: Copybook
Reply with quote

How will I know If what tool do we possibly used in mapping a dataset with its copybook?
Thanks.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jan 14, 2008 8:44 am    Post subject: Re: Copybook
Reply with quote

madlui56 wrote:
How will I know If what tool do we possibly used in mapping a dataset with its copybook?
Thanks.


Try asking your coworkers?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Jan 14, 2008 9:28 am    Post subject: Reply to: How to map or use copybook without a fileaid?
Reply with quote

Most pgmrs have a little test pgm that they use to test functions they're not sure of. If you don't, make one and include a COPY stmt for the file layout in WS.

PS Just to be sure, write an 01 level item before the COPY stmt.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Jan 14, 2008 9:32 am    Post subject:
Reply with quote

Jack,
How does your suggestion solve TS problem? If I understood OP well, he wanted to map a file with copybook (as we do in FILEAID) without using FILEAID or such tool.
Back to top
View user's profile Send private message
madlui56
Currently Banned

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jan 14, 2008 9:42 am    Post subject: Copybook
Reply with quote

Murali that's right..How can I do that?

Thanks.
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Mon Jan 14, 2008 12:21 pm    Post subject: Reply to: How to map or use copybook without a fileaid?
Reply with quote

Quote:

How does your suggestion solve TS problem? If I understood OP well, he wanted to map a file with copybook (as we do in FILEAID) without using FILEAID or such tool.


As jack suggested this is a pretty simple code.

Step 1 :
Put this in your working storage
Code:

copy your-copybook-name


Step 2 :
And then read the file your are having into the given working storage copybook.

Step 3 :
Put displays as :
Code:

Display "WS-FIELD1" : WS-FIELD1


This will show you the mapping of file records to its respective copybook.

Note : please make sure you include your copybook library(where the given copybook resides) in the SYSLIB before compiling the program.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Jan 14, 2008 12:25 pm    Post subject:
Reply with quote

Abhishek,

If you few records, the trick suggested by Jack (and later explained in detailed by you) works well. Assuming you have 'n' million(s) of records..... then icon_cry.gif
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Mon Jan 14, 2008 12:30 pm    Post subject:
Reply with quote

Quote:

Assuming you have 'n' million(s) of records..... then


Well in that case just try to put formatted mapped output into a output file and try viewing it using 3.4 directly. I think this will be of no harm.
Back to top
View user's profile Send private message
madlui56
Currently Banned

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jan 14, 2008 1:58 pm    Post subject: Well in that case just try to put formatted mapped output ..
Reply with quote

How about if we have a variable length records?
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Mon Jan 14, 2008 2:04 pm    Post subject:
Reply with quote

Quote:
How about if we have a variable length records?


Will this have any affect on the given logic. I don't think so. As you already have a defined copybook for the file.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Jan 14, 2008 9:52 pm    Post subject:
Reply with quote

If you have a few million recs, nothing will help except your imagination.

FileAid takes a stab at a solution, but is fnctionally limited. 3.4 will run you into a region size problem.

IMAGINATION!!!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jan 15, 2008 2:50 am    Post subject:
Reply with quote

Hello,

If you have millions of records, they cannot be worked with easily (if at all) anyway.

I'd suggest creating a subset of a small number of records and continuing with the subset.
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 Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
No new posts Using Field names in FILEAID Batch CO... Atul Banke Compuware & Other Tools 2 Wed Jun 29, 2016 9:54 pm
No new posts Geneartion of COBOL copybook structre... murugan_mf COBOL Programming 3 Fri May 20, 2016 12:48 pm
No new posts View Copybook having COPY statement i... nkumar Compuware & Other Tools 6 Mon May 16, 2016 7:28 pm
No new posts FileAid to compare(logical operations... anand1204 Compuware & Other Tools 3 Wed Apr 06, 2016 2:55 am


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