i need a program by giving input as a abcd in any randem order
but i need a output as 1234 related to abcd. i.e,. a for
1,b=2,c.....etc..
Answer Posted / parvatraj m bhuti
first we have to initialize the letters a=1,b=2,....
like that z=26..
then we have to read the variable v pic x(4)( which may be
abcd or any other) from input
Then we have to un string the variable v into 4 other
variables as a1,a2,a3,a4.
then
compute x1= (a1*10)+a2;
compute x2= (x1*10)+a3;
compute x3= (x2*10)=a4;
Then display ('answer is = ", x3);
That will be the answer.
| Is This Answer Correct ? | 2 Yes | 0 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
Can a Search can be done on a table with or without Index?
how do you reference the variable unblock file formats from cobol programs
i need a small 3d program using inline and outline.
What are the different rules to perform a Search?
Why would you use find and get rather than to obtain?
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?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
Name the sections present in data division.
what is the use of outrecord?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
what is search and searchall?what is the diffrence between them?give an best example?
example for sub strings ? and refernce modifications whit output pls
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.