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
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What are 77 levels used for?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
What are the different rules for performing sort operation?
How do you define a variable of comp-1 and comp-2?
How to know whether the module is dynamical or statistical?
i want a program using by if, evaluate , string, unstring, perform, occurs?
how to access the file from prodution from changeman tool and to submit a file to production
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
Why occurs cannot be used in 01 level in COBOL?
How can you get the ksds file records into your cobol program?
IF I mention stop run in CICS what happens?
What kind of error is trapped by on size error option?
how to refer the data field?