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 / 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 |
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
Can JUSTIFIED be used for all the data types?
what is rediffine clause?in what situation it can use?give me real time example?
how to transfer the file from pc to mainframe??
What is the default value of DISP parameter?
how do u list the abended jobs?
How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. stop run. para1: move 10 to a.
what happens when a copybook variables are declared using include statement ?
What is the LINKAGE SECTION used for?
What are the cobol coding sheets?
what are the control characters used in reports
What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?