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
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
Explain about different table spaces.
Write a program that uses move corresponding.
Which Search verb is equivalent to PERFORM…VARYING?
How do you define a variable of comp-1 and comp-2?
how do you reference the fixed unblock file formats from cobol programs
What is inspect in cobol ?
What is a report item?
Write the code implementing the perform … varying.
Can we redefine the field of x(200) to less than 200?
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 ......
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
how to refer the data field?
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
Give some examples of command terminators?