IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

working with Copybooks


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Mon Jun 16, 2008 3:07 pm
Reply with quote

Hi,

I have a copybook or a record structure from which i need to obtain the field names and the corresponding PIC values. How can this be achieved.

Ex: 01 emp-record.
05 name pic x(5)
05 city pic x(10)
05 country pic x(10)
My output should be:
name 5
city 10
country 10

Please help me out.....
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Jun 16, 2008 3:19 pm
Reply with quote

If you have FileAid, RLPRINT is your answer...

O.
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Mon Jun 16, 2008 3:40 pm
Reply with quote

ofer71 wrote:
If you have FileAid, RLPRINT is your answer...

O.


i dont have fileaid... i should somehow copy them in stem variables
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Mon Jun 16, 2008 3:40 pm
Reply with quote

use the same approach as in ...
http://www.ibmmainframes.com/viewtopic.php?p=137555&highlight=#137555
http://www.ibmmainframes.com/viewtopic.php?p=137486&highlight=#137486
which Yourself started some time ago


and please stop asking repeatedly about the same issue
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Mon Jun 16, 2008 4:00 pm
Reply with quote

this is not the same issue ...i guess you are finding problems with understanding the requirements.......This forum should be a healthy forum where people help others to solve the problems or assist them....This is however not pretty visible in your answers. kindly understand the problem a person undergoes while submitting queries and dont do a mockery
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 Jun 16, 2008 5:04 pm
Reply with quote

anirudh1985 wrote:
this is not the same issue ...i guess you are finding problems with understanding the requirements.......This forum should be a healthy forum where people help others to solve the problems or assist them....This is however not pretty visible in your answers. kindly understand the problem a person undergoes while submitting queries and dont do a mockery


No problem understanding your issues. For someone asking for help I think some sign of more thinking and less flaming would be wise.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Mon Jun 16, 2008 5:47 pm
Reply with quote

I must say the requirements do look like the same issue to me.
However, the OP could probably meet the requirement by first using the cobdfsym REXX program (DFSORT) which can be found at www-304.ibm.com/systems/support/storage/software/sort/mvs/tricks/pdf/sorttrck.pdf

Given a compile listing of the COPYBOOK, this gives the field name, start-pos and length for fields. Extracting the first and third parameters from the output should give him pretty much what he wants.


Regards,

Garry.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Jun 16, 2008 8:43 pm
Reply with quote

Hello,

Quote:
this is not the same issue
Yes, it is. This question is just like your "other" (same) question. The only difference is that this one is a bit more simple than the other.

Unless, you have not described what you want clearly. . .

If you already have something that will give you the length and displacement of the fields in a copybook, why can you not use it to get only the length?
Back to top
View user's profile Send private message
mbizzle

New User


Joined: 06 May 2020
Posts: 7
Location: United States

PostPosted: Wed May 06, 2020 6:55 pm
Reply with quote

I registered just so I could share this fix to COBDFSYM.

I had been using it for a few years now, and loved it and was sad when our upgrade from cobol compiler V4 to V6 bricked this program. Luckily, it was a fairly simple fix to update it.
Here are the fixes you need to make to allow it to be compatible with the V6 (and i assume V5) compilers.
I am posting this on a few forums so that others may find it that have the same issue.

change this line
parse var line 92 asmdef datatyp .
to
parse var line 87 asmdef datatyp .

and add this line

do until left(line,1) = '1'
call Put_line
parse pull line
if pos('End of Data Division Map',line)<> 0 then leave
end
Back to top
View user's profile Send private message
Philip Chan

New User


Joined: 11 Apr 2022
Posts: 1
Location: Hong Kong

PostPosted: Fri Apr 22, 2022 7:21 am
Reply with quote

Can somebody provide a complete COBDFSYM REXX as I have experienced that my copy does not work after Cobol upgrade from v4.2 to v6.3? Many thanks.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2594
Location: Silicon Valley

PostPosted: Sat Apr 23, 2022 5:41 am
Reply with quote

COBDFSYM is here, on page 89.
www.ibm.com/support/pages/system/files/inline-files/$FILE/sorttrck.pdf

but see the post from mbizzle just prior to your post. you probably have to modify it yourself.

See also ibmmainframes.com/viewtopic.php?t=49973&highlight=cobdfsym
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts ICETOOL with JOINKEY for Big record l... DFSORT/ICETOOL 12
No new posts JCL JOB Cancel/Purge Not Working JCL & VSAM 6
No new posts OMVS Shell Script not working properly. All Other Mainframe Topics 1
Search our Forums:

Back to Top