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
 

 

What is the "SORT CHA" Command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: What is the "SORT CHA" Command
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Wed Apr 04, 2012 2:13 pm    Post subject:
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    Post subject:
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    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed Apr 04, 2012 4:35 pm    Post subject:
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    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed Apr 04, 2012 5:04 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Wed Apr 04, 2012 7:34 pm    Post subject: Reply to: What is the "SORT CHA" Command
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Apr 04, 2012 7:49 pm    Post subject:
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    Post subject: Re: Reply to: What is the "SORT CHA" Command
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Apr 05, 2012 1:53 pm    Post subject: Reply to: What is the "SORT CHA" Command
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
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 convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


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