I have a Field which is of size 9(4). In the Screen if I enter
the value for this field as 1234, it showing it as Valid. But if
I enter only one or two digits, zeros should be appended in the
remaining places. For example: When u enter 1 in the screen the
output should be 0001. When you enter 12, output should be 0012.
How to achieve this in the program?
Answer Posted / girish kumar
IN THE MAP JUST U CODE PICIN AS X(LENGTH) AND NEVER CODE THE
ANYTHING IN THE "INITIAL" JUST GIVE A BLANK SPACE.
FOR EX: IF YOU ARE DOING ADDITION USE
FUNCTION NUM VALUES(NO1I) PIC X(5).
FUNCTION NUM VALUES(NO2I) PIC X(5).
THEN COMPUTE NO1I + NO2I.
CODE LIKE THIS IN APPLICATION PROGRAM
I GET THE EXACT RESULT.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the ways fot initiating a transaction?
What is the use of mdt (modified data tag)?
What is the pcp in the cics?
How ENQ and DEQ used in CICS?
when you compile a cics program, the (pre) compiler puts an extra chunk of code. Where does it get included and that is it called? What is its length?
What is the main function of the sign-on table?
Explain the primary significance of intra-partition and extra-partition tdqs ?
Sync points cannot be requested by the application programs? State true or false
Explain the difference between a package and a plan.
Can you define attribute byte?
Explain the difference between intra partition tdq and extra partition tdq?
How errors are handled in CICS programs?
What does a cics translator do?
What are the recoverable cics resources?
What is the meaning of the enq command?