View previous topic :: View next topic
|
Author |
Message |
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
How will I know If what tool do we possibly used in mapping a dataset with its copybook?
Thanks. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
Murali that's right..How can I do that?
Thanks. |
|
Back to top |
|
|
abhishekmdwivedi
New User
Joined: 22 Aug 2006 Posts: 95 Location: india
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
Back to top |
|
|
abhishekmdwivedi
New User
Joined: 22 Aug 2006 Posts: 95 Location: india
|
|
|
|
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 |
|
|
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
How about if we have a variable length records? |
|
Back to top |
|
|
abhishekmdwivedi
New User
Joined: 22 Aug 2006 Posts: 95 Location: india
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|