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
 
SYMNAMES using COBDFSYM for OCCURS clause

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 310
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Tue Jul 10, 2018 5:38 pm    Post subject: SYMNAMES using COBDFSYM for OCCURS clause
Reply with quote

Hi,

I am trying to generate the SYMNAMES using COBDFSYM, which uses Data Division Map in the compile listing to generate the symbols. However I am not able to generate the SYMNAMES for the occurs clause. In the Data Division Map, I can identify if a field is having OCCURS clause, but not able to find the number of occurrences.

Can any one let me know how to generate the SYMNAMES correctly when the copybook have occurs clause?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8729
Location: Welsh Wales

PostPosted: Tue Jul 10, 2018 6:58 pm    Post subject:
Reply with quote

Are you really sure that this should be in the REXX / CLIST section of the forum
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 310
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Tue Jul 10, 2018 7:06 pm    Post subject:
Reply with quote

COBDFSYM is a rexx program(Freeware courtesy of IBM), that's why I posted in REXX forum.

Copybook:
Code:
         01  INPUT-AREA.                                               
             05  DATA-INPUT-AREA.                                       
                 07  WS-INPUT-AREA-01                                   
                                             PIC X(1).                 
                     88  WS-VALUE-1          VALUE '1'.                 
                     88  WS-VALUE-2          VALUE '0'.                 
                 07  WS-INPUT-AREA-02                                   
                                             PIC X(4).                 
                 07  WS-INPUT-AREA-03                                   
                                             PIC S9(3)       COMP-3.   
                 07  WS-INPUT-AREA-04                                   
                                             PIC 9(2).                 
                 07  WS-INPUT-AREA-05                                   
                                             PIC S9(5)       COMP-3     
                                             OCCURS 3 TIMES             
                         INDEXED   BY WS-INPUT-AREA-05-X.               
                                                                       
                 07  WS-INPUT-AREA-06                                   
                                             PIC S9(3)       COMP-3.   

Data Division Map:
Code:
0Data Division Map
0Data Definition Attribute codes (rightmost column) have the following meanings:
     D = Object of OCCURS DEPENDING    G = GLOBAL                             S = Spanned file
     E = EXTERNAL                      O = Has OCCURS clause                  U = Undefined format file
     F = Fixed-length file             OG= Group has own length definition    V = Variable-length file
     FB= Fixed-length blocked file     R = REDEFINES                          VB= Variable-length blocked file
0Source   Hierarchy and                                    Base       Hex-Displacement  Asmblr Data                    Data Def
 LineID   Data Name                                        Locator    Blk   Structure   Definition      Data Type      Attributes
      2  PROGRAM-ID HELLO-------------------------------------------------------------------------------------------------------*
      8   1  INPUT-AREA. . . . . . . . . . . . . . . . . . BLW=00000  000               DS 0CL20        Group
      9     2  DATA-INPUT-AREA . . . . . . . . . . . . . . BLW=00000  000   0 000 000   DS 0CL20        Group
     10       3  WS-INPUT-AREA-01. . . . . . . . . . . . . BLW=00000  000   0 000 000   DS 1C           Display
     12       88 WS-VALUE-1. . . . . . . . . . . . . . . .
     13       88 WS-VALUE-2. . . . . . . . . . . . . . . .
     14       3  WS-INPUT-AREA-02. . . . . . . . . . . . . BLW=00000  001   0 000 001   DS 4C           Display
     16       3  WS-INPUT-AREA-03. . . . . . . . . . . . . BLW=00000  005   0 000 005   DS 2P           Packed-Dec
     18       3  WS-INPUT-AREA-04. . . . . . . . . . . . . BLW=00000  007   0 000 007   DS 2C           Disp-Num
     20       3  WS-INPUT-AREA-05. . . . . . . . . . . . . BLW=00000  009   0 000 009   DS 3P           Packed-Dec     O
     23          WS-INPUT-AREA-05-X. . . . . . . . . . . . IDX=00001  000                               Index-Name
     25       3  WS-INPUT-AREA-06. . . . . . . . . . . . . BLW=00000  012   0 000 012   DS 2P           Packed-Dec
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10534
Location: italy

PostPosted: Tue Jul 10, 2018 9:00 pm    Post subject: Reply to: SYMNAMES using COBDFSYM for OCCURS clause
Reply with quote

http://ibmmainframes.com/about58496.html

but You could have found it Yourself googling with COBDFSYM
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 310
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Jul 11, 2018 12:50 am    Post subject: Re: Reply to: SYMNAMES using COBDFSYM for OCCURS clause
Reply with quote

enrico-sorichetti wrote:
http://ibmmainframes.com/about58496.html

but You could have found it Yourself googling with COBDFSYM


Yes indeed. I did find, but It didn't answer the query that I raised. Hence re-posted.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10534
Location: italy

PostPosted: Wed Jul 11, 2018 2:24 am    Post subject:
Reply with quote

I just reread the topic ..
Quote:
The OCCURS cannot be directly reflected, no subscripting in the Sort products. You have a little extra manual or programmatic effort to give each occurence a unique name.


was the answer to Your question icon_cool.gif
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 310
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Jul 11, 2018 11:32 am    Post subject:
Reply with quote

Sorry for not being clear. My question was how to determine the number of occurrences using the compile listing which this COBDFSYM macro uses?
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 184
Location: USA

PostPosted: Wed Aug 08, 2018 5:15 am    Post subject: Not so easy.
Reply with quote

I've had quite a bit of experience with this and an easytrieve macro creator from cobol maps. Both have their issues. In the end I wrote my own that I can't share. One solution I found might be acceptable to those with no better means and who have access to fileaide, might be to convert the copybook to file aid format and then read that to create the version you need.

Then again, if you don't have a bunch to do, might just as well expand the occurrences manually.

I have yet to find something that converts copybooks with lots of occurs to either a symnames file or easytrieve macro as well as the program i wrote, but would love to hear of something so I can decommission my pile of mess.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1119
Location: Oostende, Belgium

PostPosted: Wed Aug 08, 2018 3:06 pm    Post subject: Re: Not so easy.
Reply with quote

jasorn wrote:
I have yet to find something that converts copybooks with lots of occurs to either a symnames file or easytrieve macro as well as the program i wrote, but would love to hear of something so I can decommission my pile of mess.

ESYMSORT, with RAP00110 as backend does this for PL/I... (Both can be found @ Prino's z/OS Tools and utilities)

And why can't you share your code?
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 184
Location: USA

PostPosted: Wed Aug 08, 2018 3:30 pm    Post subject: Re: Not so easy.
Reply with quote

prino wrote:

ESYMSORT, with RAP00110 as backend does this for PL/I... (Both can be found @ Prino's z/OS Tools and utilities)

And why can't you share your code?

Thanks. I'll take a look.

Can't share my code because it's not mine, really. I just created it but I don't own it. Guess I should start phrasing that differently.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reformat clause in joinkeys sortcard ... Mounika Nemani DFSORT/ICETOOL 2 Thu May 31, 2018 5:35 pm
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts How to get previous month in SYMNAMES Suganya87 SYNCSORT 9 Fri Oct 28, 2016 1:37 pm

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