View previous topic :: View next topic
|
Author |
Message |
v.suresh
New User
Joined: 29 Jun 2007 Posts: 5 Location: Bangalore
|
|
|
|
Hi Friends,
This is my first mail in this forum.
My question is How to eliminate high values and low values from a input file in COBOL?Once eliminate those values i want to send to new output file?Please help me to solve this problem.. |
|
Back to top |
|
|
sandeep1dimri
New User
Joined: 30 Oct 2006 Posts: 76
|
|
|
|
Hi
U can put check on the fields and compare it with cobol key word
LOW-VALUES or HIGH-VALUES
if ur condition get true skip that record other wise write to out put file
Hope it will help
Sandeep |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
v.suresh
Quote: |
How to eliminate high values and low values from a input file |
Clarify, as to whether you want to omit the record which has the LOW VALUE or want to replace the LOW VALUE with some thing else?
If you are able to use a SORT card instead of COBOL, either to omit or replace LOW VALUES, it would be more easier.
If it has to be done only in COBOL, sandeep1dimri's suggestion is good enough.
Else, if you wish to use SORT
Code: |
OMIT COND=(1,5,BI,EQ,X'00')
|
This OMIT cond will omit the records with the LOW-VALUES, at position (1,5, and can be changed as per your req. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forums,
Please look at some of your data in hex and copy/paste a small amount of your data (containing some high/low values) and how you want the output from this data stored when written to a new output file. |
|
Back to top |
|
|
Ashwin_mudikon
New User
Joined: 03 Apr 2007 Posts: 32 Location: Chennai
|
|
|
|
hi,
you can use the following code.
Code: |
INSPECT INP-REC REPLACING ALL LOW-VALUES BY SPACES.
INSPECT INP-REC REPLACING ALL HIGH-VALUES BY SPACES. |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
There are several things you might do, but you need to show some of the problem data and the result you want when you have processed the progblem data.
Once you clarify your requirement, people here will offer suggestions. |
|
Back to top |
|
|
|