Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to eliminate High values and low values from a file?
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Jun 29, 2007 11:38 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Jun 29, 2007 6:09 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us