Page 1 of 1

conversion of float variable to string.

PostPosted: Fri Jul 30, 2010 10:57 am
by isai_22
Can someone help me out in finding the logic to move a variable of data type 9(2)v9(4) to x(10). I'm moving because I have do string manipulations with that.

Re: conversion of float variable to string.

PostPosted: Fri Jul 30, 2010 2:41 pm
by Robert Sample
Why not the MOVE statement?

What have you tried and not gotten working?

Re: conversion of float variable to string.

PostPosted: Sat Jul 31, 2010 9:44 am
by dick scherrer
Hello and welcome to the forum,

As COBOL does not support "string"s, how do you need to manipulate one?

Also, 9(2)v9(4) is not the same length as x(10), so what should happen?

If you show some sample "input" and the "output" you want from the sample input, someone may have a suggestion.

Re: conversion of float variable to string.

PostPosted: Wed Aug 04, 2010 1:20 pm
by salltm
A {9(2)v9(4)} to B {x(10)}.

if you need keep the dot. (.), i guess you want to display / show the value on screen. right?
a temp varaible is needed. C Z9.9(4)

  MOVE SPACES TO B
  MOVE  A to C
  MOVE C TO B. 


hope it works. ;)