Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Subject: sort/specification file problem

Original Message
Name: dcrim
Date: March 4, 2003 at 06:30:45 Pacific
Subject: sort/specification file problem
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


Report Offensive Message For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: sort/specification file problem

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software



Version Tracker Pro
Keep your software current and secure, effortlessly

Click Here for a Free Scan

Driver Agent
Automatically find the latest drivers for your computer.
Click Here for a Free Scan



The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC