How to covert given string into ASCII value in COBOL/MF
COBOL
Answer Posted / 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 View All Answers
What is the difference between perform … with test after and perform … with test before?
What are various search techniques in cobol? Explain.
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What is the difference between binary search and sequential search?
Are you comfortable in cobol or jcl?
What is comp-1 and comp-2?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
how do you define single dimensional array and multidimensional array in your cobol?
What are the different rules for performing sort operation?
How many bytes S(8) comp field occupy and its maximum value?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
how do you reference the variable block file formats from cobol programs
What is an in line perform? When would you use it? Anything else you wish to say about it.
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What are the different types of condition in cobol and write their forms.