Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi ! I have a sequential file an 1

Status
Not open for further replies.

Idiot

Programmer
Oct 8, 2000
26
US
Hi !

I have a sequential file and some records contain blanks for a field.

I try to copy the file into another sequential file eliminating these records with blank values.

But when i try to eliminate the rows basing on selection criteria

IF FIELD = ' '
IGNORE
ELSE
MOVE THE INPUT FILE FIELDS TO OUTPUT FILE FIELDS
WRITE OUTPUT FILE
END-IF

the records are not getting filtered.

The records which apparently contain some blank values..seems like are not blanks in fact.Or else they would have been filtered..

How to filter these records?Are the seemingly blank values are low values or high values?

I appreciate any suggestion...

Thanks
 
Do you have an system tool editor? Load the file and see whats in the field. Could be a hidden control (tab) which is not uncommon for sequential files. Some compilers put these hidden values in alphanumeric fields to pad the termination character.

How is your data item (Field) defined?

 
Hi,

If you use an editor like SPF/SE you can see what values there are inside by giving the command on the edit line:

f p'.'

which means: show me the special characters. Probably it are low-values.

 
Hi Crox /Raasi !

You have mentioned SPF/SE what is that?I know a tool called FILE AID.Also Raasi mentioned 'hidden control (tab)' what are these raasi?Also the field i am looking at is an alphanumeric field.

Assuming they are low values or high values or some control tab hidden values.. how to filter them?

Do there exits some think like

IF FIELD-A IS NUMERIC
...
END-IF

OR

IF FIELD-A IS LIKE 9999 OR MASK(9999)
...
END-IF

OR

IF FIELD-A IS NOT LOWVALUES OR HIGHVALUES
...
END-IF

SORT OF TESTS IN COBOL?

 
There is indeed a numeric test - it works like this

IF FIELD-A NUMERIC
do something
END-IF.

There is not an ISLIKE.

The high/low-values test would be

IF FIELD-A NOT = LOW-VALUES AND HIGH-VALUES
do something
END-IF.

The numeric test may work best for you. I have encountered fields that contained combinations of SPACES and LOW-VALUES and so testing for SPACES or LOW-VALUES wouldn't work.

Hope this helps
Betty Scherber
Brainbench MVP for COBOL II
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top