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

1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

0 Answers   IBM,


If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and will there be any error becoz of the Negative value

3 Answers   CTS,


What is the difference between a binary search and a sequential search what are the pertinent cobol?

0 Answers  


What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9 (4) COMP." any reason?.Please let me know any one... Cheers,Prasad

8 Answers   Syntel,


How can you declare the file ?

1 Answers   Wipro,






hi is there any means of deletin a record from a ps usin cobol not using jcl?eg if i am reading a record and if some condition is matched tat particular record must be deletd fom the ps

5 Answers   iNautix,


wht is load module and object module ?

2 Answers   DELL, TCS,


given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contenta of D E nad F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1

5 Answers   Broadridge, TCS,


In an EVALUATE statement, can I give a complex condition on a when clause?

2 Answers  


which of the following can be used as a check protection symbol a.Z b.S c.* d.+

2 Answers   TCS,


how to transfer the file from pc to mainframe??

2 Answers  


how to resolve the file status 47.......

1 Answers   MMM,


Categories