I found why it copied only two digits:
The definition of WS02-D was:
01 WS02-INPUT.
03 WS02-D.
05 WS02-COMP PIC S9(4) COMP.
So the destination in the move statement was a group level variable that similar to text.
About the second problem I tried to compare the comp
variable after...
In the displays I see 12 in both formats.
I removed the IEFCOPY statement that expanded the variable from DB smallint
to COBOL PIC S9(4) COMP and declared the variable as PIC S9(4) USAGE COMP.
Now it shows me other values.
Before that if I moved value 123 to this variable in the display I...
Hi folks,
I have a program that calls a data layer with parameter
that was received from thge JCL by ACCEPT statement:
01 WS01-TMP PIC 9(4).
01 WS02-INPUT.
03 WS02-D PIC S9(4) COMP. (SMALLINT IN THE DB TABLE)
01 WS03-OUTPUT.
03 ...
ACCEPT WS01-TMP.
DISPLAY 'WS01-TMP: ' WS01-TMP...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.