View previous topic :: View next topic |
Author |
Message |
csprakash Beginner
Joined: 21 Sep 2006 Posts: 9 Topics: 4
|
Posted: Mon Oct 16, 2006 4:20 am Post subject: PIC --8(9) |
|
|
Code: | ID DIVISION.
PROGRAM-ID. DYNAMDEL.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 ERR-CODE PIC --(8)9.
77 TEMP-CITY PIC X(15).
01 SQL-TEXT.
49 SQL-TEXT-LEN PIC S9(4) COMP.
49 SQL-TEXT-TEXT PIC X(250). |
what does this PIC --8(9) means, it is compiling without any error and running correctly. |
|
Back to top |
|
|
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Mon Oct 16, 2006 5:09 am Post subject: |
|
|
csprakash,
-- is coded before the variable to represent minus sign for any variable if it has a negative value.Try moving -100 to the variable ERR-CODE and display it , you will get :
Code: |
01 ERR-CODE PIC --9(08).
PROCEDURE DIVISION.
MOVE -100 TO ERR-CODE.
DISPLAY 'ERR-CODE IS :' ERR-CODE.
|
OUTPUT
Code: |
ERR-CODE IS : -00000100
|
Try moving positive 100 to the variable ERR-CODE and display it , you will get :
Code: |
ERR-CODE IS : 00000100
|
_________________ Shekar
Grow Technically |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|