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 Global and External Variables?
What is the LINKAGE SECTION used in COBOL?
Name the sections present in data division.
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
How many bytes S(8) comp field occupy and its maximum value?
What are literals?
What rules are to be followed while using the corresponding options?
What is the usage of comp fields in cobol?
What the difference is between continue and next sentence?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
In COBOL, what is the different between index and subscript?
Difference between array and sub-script ?
How to print 10 to 1 if the input have only 10 digit number?
Explain what you understand by passing by value.
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?