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

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,


what is the meaning of pic 9(09)v99-

4 Answers   HSBC,


I have the requirement to compare the two files and pick up the matching records. File 1. file2 23 32 32 13 34 15 35 36 36 35 43 Get the matching records from this 2 files to out file. how you will do this in cobol program?

15 Answers   ADP, Broadridge, CTS, HSBC, L&T, RBS, TCS,


what will happen if pass values more than 100 using PARM parameter?

1 Answers  


What is the difference between Structured COBOL Programming and Object Oriented COBOL ?

1 Answers  


consider the fallowing 77 stat pic 9. 88 male value 1,2,3. 88 female value 4 through7. what will be the value of stat a) set male to true. b) set female to true.

5 Answers  


What are the steps you go through while creating a COBOL program executable?

3 Answers  


why do u need inspect verb?

3 Answers   Patni,


i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?

1 Answers   HCL,


I know my query will return more than one row but I don't want cursor what should I do?

1 Answers  


Read a flat file and write last but one (I have n records in a file I have to write n-1th) record in another flat file. Could you please provide me the code in COBOL?

1 Answers  


Explain complete concept of table handling in COBOL with an example?

2 Answers   IBM, TCS, Wipro,


Categories