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 do you understand by psb and acb?

0 Answers  


where will we code call by content and call by reference dude pls reply soon ?

2 Answers  


what is the difference between occurs and occurs depending on? i dont think so there is the difference in storage..then why we should use occurs depending on?

9 Answers   TCS, Tech Mahindra,


What is the difference between comp and comp-3 usage?

0 Answers  


consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B select one of the following data divusion entries which gives identical results for both the above IF statements a.01 Z PIC 9 88 X VALUE 1.9 88 Y VALUE 0.2 THRU 8 b.01 Z PIC 9 88 X VALUE 0.2 THRU 8 Y VALUE 1.9 c.01 Z PIC 9 88 X VALUE 1.9 88 NOT-Y VALUE 0.2 THRU 1.9 d.none of yhe above

3 Answers   TCS,






which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks

1 Answers  


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

0 Answers  


can we use go to statement inline-perform?

7 Answers   IBM,


What is the difference between a binary search and a sequential search?

10 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  


i want a program using by if, evaluate , string, unstring, perform, occurs?

1 Answers  


I had 100 records and i want to execute last three records by using cobol programming?what will be coding?

4 Answers   IBM,


Categories