Operating System - OpenVMS
1828622 Members
1463 Online
109983 Solutions
New Discussion

Re: VMS SORT Specification Sort Sequence

 
SOLVED
Go to solution
Robert Atkinson
Respected Contributor

VMS SORT Specification Sort Sequence

Anyone know where the ascending/descending should go in the SORT Specification??

ALPHA_ROB$$ SORT /SPECIFICATION=robsort.tmp /sequ dsk$webreports rob.tmp

ALPHA_ROB$$ typ robsort.tmp
/field=(name=report,pos=1,size=15)
/field=(name=group,pos=83,size=10)
/field=(name=record,pos=1,size=200)
/condition=(name=select_report1,
test=(group eq "WHMANAGER " ))
/include=(condition=select_report1,key=report,data=record)
ALPHA_ROB$$

Cheers, Rob.
5 REPLIES 5
Robert Atkinson
Respected Contributor

Re: VMS SORT Specification Sort Sequence

Tried adding '/key' to the bottom, but no joy :-

/field=(name=report,pos=1,size=15)
/field=(name=group,pos=83,size=10)
/field=(name=record,pos=1,size=200)
/condition=(name=select_report1,
test=(group eq "WHMANAGER " ))
/include=(condition=select_report1,key=report,data=record)
/key=(report,descending)

Off home to think about it for the weekend!!
Volker Halle
Honored Contributor

Re: VMS SORT Specification Sort Sequence

Robert,

there is one example (see example 1) in the manual, which talks about ascending/descending:

http://h71000.www7.hp.com/doc/731FINAL/6489/6489pro_022.html#srt_specification_file

It looks a bit complicated though...

Volker.
Ian McKerracher_1
Trusted Contributor
Solution

Re: VMS SORT Specification Sort Sequence

Hello Rob,

Try using either

/include=(condition=select_report1,key=(report,descending),data=record)

or

/include=(condition=select_report1,data=record)
/key=(report,descending)


Regards,

Ian



Hein van den Heuvel
Honored Contributor

Re: VMS SORT Specification Sort Sequence

Just put the word acsending or descending with the key spec: /key=(report,desc)

Hein.
Robert Atkinson
Respected Contributor

Re: VMS SORT Specification Sort Sequence

Cheers guys. I'd tried "key=report,descending" but didn't think to put it in parenthasis!

This line worked fine for my sort spec in the end :-

/include=(condition=select_report1,key=(report,descending),data=record)

Rob.