How to covert given string into ASCII value in COBOL/MF
COBOL

Answers were Sorted based on User's Feedback



How to covert given string into ASCII value in COBOL/MF COBOL..

Answer / asmara

Just by using translate verb only u can easily translate it.

Is This Answer Correct ?    3 Yes 0 No

How to covert given string into ASCII value in COBOL/MF COBOL..

Answer / anu

please explained the answr for this question in detail.

Is This Answer Correct ?    1 Yes 1 No

How to covert given string into ASCII value in COBOL/MF COBOL..

Answer / asmara

translate(Rtrim(Ltrim(substr(col_1,1,6))),'$',0123456789')
=''

thru leading (LTRIM) and Trailing (RTRIM) spaces from the
substring, then translates embedded spaces to $ and digits
to spaces and leaves any other char unchanged, then checks
to be sure there is nothing but spaces left. We can say
that we are checking the substring contains only numberic
digits, optionally with leading and/or trailing spaces.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More COBOL Interview Questions

What is an in line perform? When would you use it? Anything else you wish to say about it.

0 Answers  


how do you reference the printer file formats from cobol programs

0 Answers  


In COBOL programming, what is PERFORM? What is VARYING?

0 Answers   CDC,


Can we put move statement in COBOL copybook

3 Answers   Global Logic,


when iam reading a flat file which has 100 records through cobol program when iam reading 50th records it gets abends .. so when i run the program again it should read from 50th record .where it got abened ? how it is possible

1 Answers   Patni,






Suppose i have a Cobol field of 10 byte. it contains a decimal sign.How to know where is the point location?

1 Answers  


what will be the output when a)pic 9(6)value 000178 is moved to pic ***,***. b)pic 9(5) value 57397 is moved to pic $$,$$9.

5 Answers  


Did anybody attend the walkin of TCS on 31st July in Gurgaon for any technology,If u have completed 3 round i.e till the HR round,have u received the Offer letter yet? Please let me know.Thanks.

1 Answers  


if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error

8 Answers   Cap Gemini,


Discuss about changing dataset name in proc.

0 Answers  


How to convert bunch of words in a line to relvant ASCII values?

2 Answers  


input:- 12233344445555566666... output:- 1=1,2=4,3=9... Here firstno i.e 1 should be displayed and after that the alikeno.s should be added n displayed.i.e 2+2=4 like tat it goeson.

1 Answers  


Categories