In a file if a column account number conatain value 0001234.. how can we move the value to another variable without zero. value may contain any type such as 00123405. we need the value 1234 or 12305. how can we do that in cobol. Please help.
Answer Posted / mahesh satya
variable pic 9(08).
perform varying I from 1 by 1 until I < 8 or found
IF VARIABLE(I:1) not = 0 then
compute actual = 8 - I
move VARIABLE(I: actual) to NEW_VARIABLE
set found to true
end-if
end-perform
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
Which is not true about evaluate statement
example for sub strings ? and refernce modifications whit output pls
Write a program to enter and display the names of students in a class using the occurs clause.
Name some of the examples of COBOl 11?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
Describe the cobol database components?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
) How do u handle errors in BMS macro
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
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
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
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?