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

In INITIALIZE what is Repalcing Word will do

1 Answers   CTS,


How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)

3 Answers   IBM,


Write down the divisions of cobol program?

0 Answers  


what happens if we dont close cursor in db2-cobol pgm?

6 Answers  


How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB

6 Answers   Polaris,






how can count the number of character in feild ?? suppose for instance i have a feild with value ' rajesh sarkar' then how can v count the number of characters whitout spaces...........

4 Answers   Wipro,


how many bytes does s9(7)COMP-3 field occupies?

6 Answers   ADP,


there is a file whose ORGANISATION is INDEXED.you want to read the records from the file in RANDOM fashion as well as sequentially.then which of the access mode would you specify? a.SEQUENTIAL b.RANDOM c.DYNAMIC D.ACCESS MODE has nothing to do with it

3 Answers   TCS,


What is the difference between a DYNAMIC and STATIC call in COBOL?

2 Answers  


how can i see junk values in dclgen or in hostvariable of comp ?

0 Answers   DELL,


in real time what is the suitable exp where in-stream procedure is better then catalog procedure.

1 Answers  


What are all the divisions of a COBOL program?

0 Answers  


Categories