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?
Answers were Sorted based on User's Feedback
Answer / y@$w@nth
Sorry for the above answer i thought zeros should be supressed.
When at the time of defining the field in the map we can
code PICOUT option for eg:
SUPFIELD DFHMDF POS=(**,**),
LENGTH=4,
ATTRIB=(UNPROT,FSET),
PICOUT='9(4)',
PICIN='9(4)'
If zeros should be supressed then code following
SUPFIELD DFHMDF POS=(**,**),
LENGTH=4,
ATTRIB=(UNPROT,FSET),
PICOUT='z(3)9',
PICIN='z(3)9'
Correct me if i am wrong
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / veena
In Attrib=(UNPROT,FSET,NUM),
Num in the Attrib gives zeroes when digits are entered.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
Answer / girish kumar
code like this for the addtion.
functional num value of (input field1)
finctional num value of (input field2)
example.
functional num value(IN1)
functional num value(IN2)
SUM=ADD THE ABOVE TO FIELDS
TRY THIS IT WILL REALLY WORKS
NOTE= give the picture clause is ALPHA NUMARIC
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / y@$w@nth
When at the time of defining the field in the map we can code
PICOUT option for eg:
SUPFIELD DFHMDF POS=(**,**),
LENGTH=4,
ATTRIB=(UNPROT,FSET),
PICOUT=z(3)9,
PICIN=z(3)9
Correct me if i am wrong
| Is This Answer Correct ? | 0 Yes | 3 No |
What is program reentrance?
Do you receive the attribute byte in the symbolic map?
Add a field to screen when what's the flow of impact?
what is the difference between a return with transid and xctl? For example program. A is issuing return with transid to program b. Program a. Is isssuing xctl to program b?
What is the function of the CICS translator?
Which command is used to release a record on which exclusive control is gained?
define the field with ic in the bms map.
Explain the thress bms options?
hi,what is the module? how many modules in mainframe based banking projects
What are the situations under which NEWCOPY is required ?
What is the common work area?
How does COBOL11 and CICS release 1.7 provide for exceptional and how does that differ from VS COBOL and earlier CICS release?