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

how to get A pds member name using dfsort


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sureshmurali
Warnings : 1

New User


Joined: 25 Nov 2010
Posts: 70
Location: Sivakasi, India

PostPosted: Sun Jan 22, 2012 12:08 am
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Sun Jan 22, 2012 1:36 am
Reply with quote

I think REXX would be more suited & straight forward to this task than DFSORT.
But then its only my personal POV.
Back to top
View user's profile Send private message
sureshmurali
Warnings : 1

New User


Joined: 25 Nov 2010
Posts: 70
Location: Sivakasi, India

PostPosted: Sun Jan 22, 2012 9:09 am
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sun Jan 22, 2012 10:39 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jan 23, 2012 6:35 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Jan 23, 2012 1:38 pm
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Jan 23, 2012 10:23 pm
Reply with quote

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
View user's profile Send private message
Narayanan Annamalai

New User


Joined: 20 Jan 2012
Posts: 6
Location: India

PostPosted: Wed Jan 25, 2012 3:02 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 25, 2012 3:32 pm
Reply with quote

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
View user's profile Send private message
Narayanan Annamalai

New User


Joined: 20 Jan 2012
Posts: 6
Location: India

PostPosted: Wed Jan 25, 2012 4:04 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 25, 2012 4:14 pm
Reply with quote

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
View user's profile Send private message
sureshmurali
Warnings : 1

New User


Joined: 25 Nov 2010
Posts: 70
Location: Sivakasi, India

PostPosted: Wed Jan 25, 2012 8:14 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 25, 2012 8:45 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top