IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to eliminate High values and low values from a file?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
v.suresh

New User


Joined: 29 Jun 2007
Posts: 5
Location: Bangalore

PostPosted: Fri Jun 29, 2007 9:52 am
Reply with quote

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
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Fri Jun 29, 2007 10:48 am
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Jun 29, 2007 11:00 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 29, 2007 11:38 am
Reply with quote

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
View user's profile Send private message
Ashwin_mudikon

New User


Joined: 03 Apr 2007
Posts: 32
Location: Chennai

PostPosted: Fri Jun 29, 2007 1:59 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 29, 2007 6:09 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top