View previous topic :: View next topic
|
Author |
Message |
sureshmurali Warnings : 1 New User
Joined: 25 Nov 2010 Posts: 70 Location: Sivakasi, India
|
|
|
|
i have a pds of 8 members and each of them is a cobol program. i want to list out paragraph names of each of them to a single ps with only the details of member name and paragraph names in it. Can anybody please tell me how to get the member name of a pds using dfsort? I am new to SORT also. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
I think REXX would be more suited & straight forward to this task than DFSORT.
But then its only my personal POV. |
|
Back to top |
|
|
sureshmurali Warnings : 1 New User
Joined: 25 Nov 2010 Posts: 70 Location: Sivakasi, India
|
|
|
|
Thanks for the reply. But could you please let me know if it is possible to get the member name of a pds using SORT ? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Have you looked for examples in the DFSORT documentation or in the forums? I would also look at the JCL requirements for DFSORT and sort control cards to see if anything is mentioned about PDS members. The indexes of the various manuals will narrow down your search. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
sureshmurali wrote: |
Thanks for the reply. But could you please let me know if it is possible to get the member name of a pds using SORT ? |
You want to give DFSORT a PDS and have it read all the members, do a bit of processing, and list the results of member1, paragraphs in member1, etc?
No.
Look in the rexx forum here, you'll find lots of examples of reading members and then doing stuff with them. Pick a good one. Poke it about a bit. Done. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
DFSORT alone cannot give you what you want.
DFSORT can operate on a PDS(member), but not on all the members of a PDS at once.
Gerry |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
sureshmurali,
1.Flatten the PDS into a sequential file using IEBPTPCH which will put a header with the member name followed by the contents of the member.
2. Read that sequential file into DFSORT and perform the task you want.
The above 2 tasks are pretty simple , but the biggest problem for you is to identify the paragraph names. |
|
Back to top |
|
|
Narayanan Annamalai
New User
Joined: 20 Jan 2012 Posts: 6 Location: India
|
|
|
|
As per the coding standards, I believe the paragraph names (User defined) and few pre-defined parameter should begin in Area A (col 8-11).
Given that, I think we should be able to filter out the paragraph names using SORT Control cards. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Narayanan Annamalai wrote: |
As per the coding standards, I believe the paragraph names (User defined) and few pre-defined parameter should begin in Area A (col 8-11).
Given that, I think we should be able to filter out the paragraph names using SORT Control cards. |
Whose "coding standards"? At your site? Not relevant.
Kolusu knows what he is talking about.
According to the manual, a paragraph can start anywhere in AREA A without a problem. You also have your DIVISIONs and SECTIONs up to and including the PROCEDURE DIVISION in the same area.
Plus of course comments.
To deal with all those is not trivial in the sense of "just whack in an OMIT". To not deal with them calls the output into question unless you are 100% certain that every line conforms to your local standards, which has to have been verified in some way, as the compile messages will be no help on that. |
|
Back to top |
|
|
Narayanan Annamalai
New User
Joined: 20 Jan 2012 Posts: 6 Location: India
|
|
|
|
Ok. I thought a suggestion could trigger out ideas to accomplish this requirement.
I have extracted the paragraph names using REXX with the same logic and have succeeded.
May be, as you mentioned, the constraint is with COBOL Standards followed which should be optimum. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Your suggestion to use rexx instead of Sort is a good one. The point being there are better ways to accomplish the task than to use Sort, for this one. |
|
Back to top |
|
|
sureshmurali Warnings : 1 New User
Joined: 25 Nov 2010 Posts: 70 Location: Sivakasi, India
|
|
|
|
Hi everyone
I am really sorry and i should have told this before.
I already did the same task using REXX before. But interested in knowing how it could be done thru SORT.
Thanks |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes, would have saved some...
Kolusu has shown you how to do the member followed by contents (not in Sort).
It is possible to do in Sort. If you are that interested, have a crack yourself and show us when/if you get stuck. If it is a raging success, post the output here please, for others who might through some quirk of fate have to do this in Sort. |
|
Back to top |
|
|
|