Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Unstring in Visual COBOL

$
0
0

Hi

I am trying to perform an Unstring on a response received(String).

Following is the code which i am using

01 numeric-test-varPIC 9(1) .

01 input-String1PIC x(9) valuespaces .

01 String2  PIC x(6) valuespaces .

Para1. 

move'ABCDEF! !'toinput-String1.

Unstringinput-String1 delimitedby'!'into

 String2

 numeric-test-var.

displaynumeric-test-var.

 

When the above code executed i am getting the following value in "numeric-test-var"

' '.

I am getting space in numeric variable. Which is different.

Also if i change the defination of "numeric-test-var" from PIC 9(1) to PIC 9(5) and perform the same code as above and display the value of "numeric-test-var" then the response will be

'0000 '. The last digit in numeric field is spaces now.

Please let me know if you can provide what i need to do to correct it? Also this is not happening in Net Express 5.1.

Thanks

Charan

 


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>