View previous topic :: View next topic
|
Author |
Message |
patriot
New User
Joined: 01 Dec 2006 Posts: 8 Location: chennai
|
|
|
|
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 |
|
|
vicky10001 Warnings : 1 Active User
Joined: 13 Jul 2005 Posts: 136
|
|
|
|
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 |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
U can also use this..
INSPECT field REPLACING ALL low-values BY SPACE. |
|
Back to top |
|
|
devidas-patil
New User
Joined: 08 Jan 2007 Posts: 54 Location: pune
|
|
|
|
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 |
|
|
|