Computing.Net > Forums > OpenVMS > sort/specification file problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sort/specification file problem

Reply to Message Icon

Name: dcrim
Date: March 4, 2003 at 06:30:45 Pacific
OS: openvms 7.2-1
CPU/Ram: alphaserver es40/16GB
Comment:

Hi all!

I'm having a problem with the SORT/SPEC command. I need to remove unwanted records (based on a date/time field) from a file but all input records are propagating to the output file. I could have a DCL procedure read the file, but I figured SORT would be faster. I use the command;
$sort/spec=specfile infile outfile

The input file contains:
7 district names loaded.
123456789-123456789-123456789- this line is to count columns
MIM00326004061102003030319551
MIM00326005002702003030119551
MIM00326005002702003030319551
NSI12016003001012003030320154
NSI12016009601022003030320154
SOM11323001806062003030320401
SOM11323010806072003030322444
SLM00228714001562003030320074
SLM00216006603062003030319301
NRM01224005107202003030401184
NRM01224011909132003030323564
SJC11505860405872003030316331
SJC11505862806712003030316131

The specification file contains:
/field=(name=district,position:1,size:6,character)
/field=(name=unitid,position:7,size:10,character)
/field=(name=datetime,position:17,size:12,CHARACTER)
/field=(name=unitype,position:29,size:1,character)
/field=(name=today,value:"200303051200",size:12,character)
/field=(name=tomorrow,value:"200303061200",size:12,character)
/condition=(name=istoday,test=(datetime ge today))
/condition=(name=istomorrow,test=(datetime le tomorrow))
/condition=(name=nottoday,test=(datetime lt today))
/condition=(name=nottomorrow,test=(datetime gt tomorrow))
/include=(condition=istoday)
/include=(condition=istomorrow)
/omit=(condition=nottoday)
/omit=(condition=nottomorrow)

I've tried the spec file with all upper case, switched "=" for ":" and no change; all input data goes to the output file. Any ideas? Thanks!

Dave



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to OpenVMS Forum Home


Sponsored links

Ads by Google


Results for: sort/specification file problem

dir /date www.computing.net/answers/openvms/dir-date/13.html

FTP file from OpenVMS to Windows www.computing.net/answers/openvms/ftp-file-from-openvms-to-windows/439.html

Sort lines www.computing.net/answers/openvms/sort-lines/372.html