View previous topic :: View next topic
|
Author |
Message |
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
If you have FileAid, RLPRINT is your answer...
O. |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
mbizzle
New User
Joined: 06 May 2020 Posts: 7 Location: United States
|
|
|
|
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 |
|
|
Philip Chan
New User
Joined: 11 Apr 2022 Posts: 1 Location: Hong Kong
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
Back to top |
|
|
|