View previous topic :: View next topic
|
Author |
Message |
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi,
I have an requirement in which I have to expand the copybook layout with the starting position and the length of each field. Similart to option 8 in fileaid. Is it possible to save the view record layout for the copybook I view through fileaid.
SAMPLE layout:
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START END
01 TMP-REC 1 23
05 TMP-NO 999 1 1 3
05 TMP-NAME X(10) 2 4 13
05 TMP-ADDR X(10) 3 14 23
******************************* BOTTOM OF DATA ************************ |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
After 5 years here you do not know how to use the code tags? Or could you just not be bothered? If the latter then I cannot be bothered with a suggested solution. |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi Nic,
Not sure what a code tag is. Are you refering to formating the layout i pasted above. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
On both the Quick Reply and Post Reply screens there is a "Code" button; clicking it inserts a Code tag at the cursor. Both screens also have "Close Tags". Text in Code tags looks like this:
Code: |
Note that a fixed font is used and that
multiple spaces used for alignment
are preserved. |
|
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Thanks Akatsukami.
For my requirement i need the copy book to be expanded like this. Similar to vat we view in File aid option 8 (
view record layout ). PLease let me know if it is possible to save the view the from file aid. or is there anyother approach for this.
Code: |
FIELD LEVEL/NAME PICTURE NUMBER START END
01 TMP-REC 1 23
05 TMP-NO 999 1 1 3
05 TMP-NAME X(10) 2 4 13
05 TMP-ADDR X(10) 3 14 23
|
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
passion_sujesh wrote: |
Thanks Akatsukami.
For my requirement i need the copy book to be expanded like this. Similar to vat we view in File aid option 8 (
view record layout ). PLease let me know if it is possible to save the view the from file aid. or is there anyother approach for this.
Code: |
FIELD LEVEL/NAME PICTURE NUMBER START END
01 TMP-REC 1 23
05 TMP-NO 999 1 1 3
05 TMP-NAME X(10) 2 4 13
05 TMP-ADDR X(10) 3 14 23
|
|
Is there some reason that copy & paste won't work? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
passion_sujesh wrote: |
Thanks Akatsukami.
For my requirement i need the copy book to be expanded like this. Similar to vat we view in File aid option 8 (
view record layout ). PLease let me know if it is possible to save the view the from file aid. or is there anyother approach for this.
Code: |
FIELD LEVEL/NAME PICTURE NUMBER START END
01 TMP-REC 1 23
05 TMP-NO 999 1 1 3
05 TMP-NAME X(10) 2 4 13
05 TMP-ADDR X(10) 3 14 23
|
|
Assuming that you cannot copy-and-paste as suggested by Mr. Giegerich, have you considered compiling the copybook in a skeleton program and then parsing the DMAP? |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi Akatsukami,
I will try this approach and get back. I was just wondering is there any way i can view the source code for the option 8 in file aid. I guess it is coded in REXX.
I am also trying if i can do the same using REXX. |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi Akatsukami,
Can you let me know how i can parse the DMAP. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
A portion of a DMAP:
Code: |
PP 5655-S71 IBM ENTERPRISE COBOL FOR Z/OS 4.2.0 0410 M3QEN DATE 03/27/2013 TIME 12:45:14 PAGE 44
SOURCE HIERARCHY AND BASE HEX-DISPLACEMENT ASMBLR DATA DATA DEF
LINEID DATA NAME LOCATOR BLK STRUCTURE DEFINITION DATA TYPE ATTRIBUTES
659 3 EXPANSION . . . . . . . . . . . . . . . . BLL=00001 563 0 000 563 DS 50C DISPLAY
661 1 COMMON-PARMS. . . . . . . . . . . . . . . . . BLL=00002 000 DS 0CL450 GROUP
662 2 ZARIY . . . . . . . . . . . . . . . . . . . BLL=00002 000 0 000 DS 0CL450 GROUP
675 3 FRMT. . . . . . . . . . . . . . . . . . . BLL=00002 000 0 000 000 DS 5C DISPLAY
676 3 VER . . . . . . . . . . . . . . . . . . . BLL=00002 005 0 000 005 DS 3C DISPLAY
677 3 LNGTH . . . . . . . . . . . . . . . . . . BLL=00002 008 0 000 008 DS 5C DISP-NUM
679 3 LOG-EVENT-CORR-ID . . . . . . . . . . . . BLL=00002 00D 0 000 00D DS 13C DISPLAY
680 3 LOG-SEQ-NUM . . . . . . . . . . . . . . . BLL=00002 01A 0 000 01A DS 5C DISP-NUM
681 3 DIAGNOSTIC-MODE . . . . . . . . . . . . . BLL=00002 01F 0 000 01F DS 3C DISP-NUM
682 3 EXPANSION1. . . . . . . . . . . . . . . . BLL=00002 022 0 000 022 DS 30C DISPLAY
684 3 USER-ID . . . . . . . . . . . . . . . . . BLL=00002 040 0 000 040 DS 60C DISPLAY
685 3 USER-ID-TYPE. . . . . . . . . . . . . . . BLL=00002 07C 0 000 07C DS 10C DISPLAY
686 3 CALLING-AREA. . . . . . . . . . . . . . . BLL=00002 086 0 000 086 DS 60C DISPLAY
687 3 CALLING-APP . . . . . . . . . . . . . . . BLL=00002 0C2 0 000 0C2 DS 60C DISPLAY
688 3 CALLER. . . . . . . . . . . . . . . . . . BLL=00002 0FE 0 000 0FE DS 60C DISPLAY
689 3 APP-VER . . . . . . . . . . . . . . . . . BLL=00002 13A 0 000 13A DS 60C DISPLAY
691 3 EXPANSION2. . . . . . . . . . . . . . . . BLL=00002 176 0 000 176 DS 76C DISPLAY |
Search for the 01 level you are interested in. Get the item name from the DATA NAME column; the starting position is the STRUCTURE (converted to decimal) plus 1. The length can be gotten from the ASMBLR DATA DEFINITION column (one displacement to another will not be accurate in the case of synchronized structures). The type (denoting picture and usage) is in the DATE TYPE column: DISPLAY = X(n); DISP-NUM = 9(n); BINARY = USAGE COMP; PACKED-DEC = COMP-3 (in this case, remember that n bytes hold 2n-1 digits. |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Thanks Akatsukami.
I shall use approach suggested by you and let you know tomorrow if it works file. |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Thanks Akatsukami. It worked, i am able to expand the copy book.
I had to code a REXX program using the idea you suggested.
Thanks again. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
You're welcome; I'm glad to that this worked for you |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Similart to option 8 in fileaid. Is it possible to save the view record layout for the copybook I view through fileaid. |
why not use the RLPRINT function of batch File Aid which was designed to do what you wanted in the first place? |
|
Back to top |
|
|
|