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 a SSRANGE and NOSSRANGE?
What are various search techniques in cobol? Explain.
how to move the records from file to array table. give with code example
What is the difference between perform … with test after and perform … with test before?
what is amode(24), amode(31), rmode(24) and rmode(any)?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
Define static linking and dynamic linking.
What is the difference between goback, stop run and exit program in cobol?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
Can we redefine the field of x(200) to less than 200?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
What is the difference between structured cobol programming and object alternativelyiented cobol?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
What is a report item?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?