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

What is the "SORT CHA" Command


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed Apr 04, 2012 1:35 pm
Reply with quote

when I want to sort the member by changed date I use SORT CHA command
now I want to sort the member with order I specify

I want to know how SORT CHA command works
can anyone tell me what is the command type of SORT , or tell me which reference I should read ?
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Wed Apr 04, 2012 1:52 pm
Reply with quote

Can you please elaborate on
"now I want to sort the member with order I specify"
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed Apr 04, 2012 2:03 pm
Reply with quote

Dsingh29 wrote:
Can you please elaborate on
"now I want to sort the member with order I specify"


For example I want to sort the members by the order I stored in a stem

(I'll get the compile date of the load module , then sort by that date , SORT CHA not work for load module LIB)
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 Apr 04, 2012 2:13 pm
Reply with quote

chaoj wrote:
Dsingh29 wrote:
Can you please elaborate on
"now I want to sort the member with order I specify"


For example I want to sort the members by the order I stored in a stem

(I'll get the compile date of the load module , then sort by that date , SORT CHA not work for load module LIB)


What do you mean by the "compile date" of a load module? A load module can contain many programs of various types. Or do you mean the link/bind date of the load module?

I'm not sure that that particular SORT is going to be any use to you, it is fairly specific and operating off the library stats, I believe. If they are not in the directory, they are not in the directory.
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Wed Apr 04, 2012 2:41 pm
Reply with quote

Chaoj,

I can deduce that, you want to see if your loadlib has the latest load module or not. For that you can look inside the load module, and look for current year or date, and you could be sure that this is the latest load module.

If you trying to achieve different, please explain, others might suggest better solutions.
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed Apr 04, 2012 3:46 pm
Reply with quote

Dsingh29 wrote:
Chaoj,

I can deduce that, you want to see if your loadlib has the latest load module or not. For that you can look inside the load module, and look for current year or date, and you could be sure that this is the latest load module.

If you trying to achieve different, please explain, others might suggest better solutions.


I know how to check the date of the load module , I just want to use REXX to sort that date like SORT CHA , cause I don't know how SORT works, I can not write the REXX , I want to know how SORT command work , then I can refer it to write the REXX
Back to top
View user's profile Send private message
vasanthz

Global Moderator


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

PostPosted: Wed Apr 04, 2012 4:35 pm
Reply with quote

I think what you are trying to achieve might not be related to SORT CHA ISPF command.
Quote:
I want to know how SORT command work , then I can refer it to write the REXX

I guess the SORT ISPF command fetches the information from PDS' "directory" which has the ISPF statistics and displays members based on the CHAnged date.

PDS directory has the ISPF creation date, changed date and other statistics, the directory will look something like,
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
----+----F----+----F----+----F----+----F----+----F----+----F----+----F----+----F
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
 ------------------------------------------------------------------------------
********************************* Top of Data **********************************                                                                               
 ------------------------------------------------------------------------------
.ÚMEMBER1 .......ç...|...|........USERID1   MEMBER2 ...........|...|........USER
0FDCDCCDF4001000040114011402010000EECDCCF444DCDCCDF4002000010114011403000000EECD
0E4542591002DF1108119F119F77060000425994100045425920021F1001119F119F700C0C004259
 ------------------------------------------------------------------------------
ID1   MEMBER3 .......á...?...?........USERID1   MEMBER4 ........................
CCF444DCDCCDF4001000040126012602010100EECDCCF444DCDCCDF4000000020112011200010100
9410004542593003EF1105111F111F460A080042599410004542594001EF1004115F115F35000000
 ------------------------------------------------------------------------------
USERID1   MEMBER5 ........................USERID1   MEMBER6 ....................
EECDCCF444DCDCCDF4001000010112011201000100EECDCCF444DCDCCDF400100000011201120101
425994100045425950027F1209119F119F560C0800425994100045425960011F1107115F115F420B


When a PDS is read with RECFM=U(works with IEBGENER not with PGM=SORT) and then written 'as is' into a output dataset you can see the directory information.
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed Apr 04, 2012 4:41 pm
Reply with quote

vasanthz wrote:
I think what you are trying to achieve might not be related to SORT CHA ISPF command.
Quote:
I want to know how SORT command work , then I can refer it to write the REXX

I guess the SORT ISPF command fetches the information from PDS' "directory" which has the ISPF statistics and displays members based on the CHAnged date.

PDS directory has the ISPF creation date, changed date and other statistics, the directory will look something like,
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
----+----F----+----F----+----F----+----F----+----F----+----F----+----F----+----F
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
 ------------------------------------------------------------------------------
********************************* Top of Data **********************************                                                                               
 ------------------------------------------------------------------------------
.ÚMEMBER1 .......ç...|...|........USERID1   MEMBER2 ...........|...|........USER
0FDCDCCDF4001000040114011402010000EECDCCF444DCDCCDF4002000010114011403000000EECD
0E4542591002DF1108119F119F77060000425994100045425920021F1001119F119F700C0C004259
 ------------------------------------------------------------------------------
ID1   MEMBER3 .......á...?...?........USERID1   MEMBER4 ........................
CCF444DCDCCDF4001000040126012602010100EECDCCF444DCDCCDF4000000020112011200010100
9410004542593003EF1105111F111F460A080042599410004542594001EF1004115F115F35000000
 ------------------------------------------------------------------------------
USERID1   MEMBER5 ........................USERID1   MEMBER6 ....................
EECDCCF444DCDCCDF4001000010112011201000100EECDCCF444DCDCCDF400100000011201120101
425994100045425950027F1209119F119F560C0800425994100045425960011F1107115F115F420B


When a PDS is read with RECFM=U(works with IEBGENER not with PGM=SORT) and then written 'as is' into a output dataset you can see the directory information.


Thanks vasanthz.
If ISPF command : SORT get status from PDS directory , do you know
how redisplay the sorted members ?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


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

PostPosted: Wed Apr 04, 2012 5:04 pm
Reply with quote

Quote:
how redisplay the sorted members ?

So you already have member names and the corresponding link/bind dates using a program and now you are trying to redisplay the screen based on bind/link dates right?

No I am not aware of how to do it icon_confused.gif
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed Apr 04, 2012 5:07 pm
Reply with quote

vasanthz wrote:
Quote:
how redisplay the sorted members ?

So you already have member names and the corresponding link/bind dates using a program and now you are trying to redisplay the screen based on bind/link dates right?

No I am not aware of how to do it icon_confused.gif


yes you're right
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Apr 04, 2012 7:34 pm
Reply with quote

SORT is an internal command that is processed by the member list display. It is an internal command and does not have a programming interface. I do not think you can do what you want with ISPF's member list display.

But, you should be able to:
1. capture the member information,
2. use TBCREATE to create a new table
3. use TBADD to add your member information in the order you want
4. use TBDISPL to show the information.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Apr 04, 2012 7:49 pm
Reply with quote

One way is to capture the member name and its bind/link date in your own ISPF table, and then display (via TBDISPL) that in lieu of a real member list.
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Thu Apr 05, 2012 6:50 am
Reply with quote

Pedro wrote:
SORT is an internal command that is processed by the member list display. It is an internal command and does not have a programming interface. I do not think you can do what you want with ISPF's member list display.

But, you should be able to:
1. capture the member information,
2. use TBCREATE to create a new table
3. use TBADD to add your member information in the order you want
4. use TBDISPL to show the information.


Thank you Pedro ! I'll learn to use table .
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Thu Apr 05, 2012 6:50 am
Reply with quote

don.leahy wrote:
One way is to capture the member name and its bind/link date in your own ISPF table, and then display (via TBDISPL) that in lieu of a real member list.


Thank you don.leahy ! I'll learn to use table .
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Apr 05, 2012 1:53 pm
Reply with quote

Quote:
can anyone tell me what is the command type of SORT , or tell me which reference I should read ?


did it occur to You that the info You ask for is available in the ISPF manuals
( link posted zillions of times on this forum )
or by scrolling thru the ISPF tutorial ( PF1 and friends ) ???

since the ISPF SORT command can sort on any column of the member list display
I really do not see any reason to write Your own.

if the member does not have the ISPF statistics the only sort is on the name!

and the member without stats will apper at the top or at the bottom of any sorted list
( apart obviously the name sorted one )
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top