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
Can you explain primary aspect of cics?
Explain how pa key is different from pf key?
What is meant by a ‘Transid’ ?
Highlight the difference between a symbolic map and physical map?
In a CICS program, how will you read a VSAM file?
What does the 'cebr:cics' transactions do?
What is meant by an AICA ABEND?
Explain ceci transaction commands?
How do you use altindxs in batch, cics programs?
Can you explain communication area?
What is the common work area?
Can you explain multitasking and multithreading?
Explain the difference between the xctl and link commands?
What does the 'cedf:cics' transactions do?
When would you use abend command?