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 handle low values from a file in a COBOL program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
patriot

New User


Joined: 01 Dec 2006
Posts: 8
Location: chennai

PostPosted: Wed Feb 28, 2007 10:55 am    Post subject: How to handle low values from a file in a COBOL program
Reply with quote

How to handle low values from a file in a COBOL program?
Ex: If i get low values for a particular field in a file, i should replace them by spaces. How do i do this?
Back to top
View user's profile Send private message

vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Wed Feb 28, 2007 11:37 am    Post subject:
Reply with quote

You can use INITIALIZE verb.

Syntax

<--------------+
>--INITIALIZE----identifier-1----------------------------------------------

---------------------------------------------------------------------------
? <---------------------------------------------------------+
+-REPLACING------ALPHABETIC-----------------------BY----identifier-2-----
+-ALPHANUMERIC--------? +-DATA-+ +-literal-1----+
+-ALPHANUMERIC-EDITED-?
+-NATIONAL------------?
+-NATIONAL-EDITED-----?
+-NUMERIC-------------?
+-NUMERIC-EDITED------?
+-DBCS----------------?
+-EGCS----------------+



Example

INITIALIZE variablename/verybookname
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Wed Feb 28, 2007 12:55 pm    Post subject:
Reply with quote

U can also use this..

INSPECT field REPLACING ALL low-values BY SPACE.
Back to top
View user's profile Send private message
devidas-patil

New User


Joined: 08 Jan 2007
Posts: 54
Location: pune

PostPosted: Wed Feb 28, 2007 2:23 pm    Post subject:
Reply with quote

Hi all,
i want to know how we will get the low values in the field of file untill we move to the field.
if we are moving that we are moving purposefully for check or either when we read from one file and processed that data and want to read another record .
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
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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