Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to get A pds member name using dfsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: how to get A pds member name using dfsort
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: 1445
Location: Azeroth

PostPosted: Sun Jan 22, 2012 1:36 am    Post subject:
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    Post subject:
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: 1713
Location: UK

PostPosted: Sun Jan 22, 2012 10:39 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon Jan 23, 2012 6:35 am    Post subject:
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: 1703
Location: Australia

PostPosted: Mon Jan 23, 2012 1:38 pm    Post subject:
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Wed Jan 25, 2012 3:32 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Wed Jan 25, 2012 4:14 pm    Post subject: Reply to: how to get A pds member name using dfsort
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Wed Jan 25, 2012 8:45 pm    Post subject: Reply to: how to get A pds member name using dfsort
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us