MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PIC --8(9)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
csprakash
Beginner


Joined: 21 Sep 2006
Posts: 9
Topics: 4

PostPosted: Mon Oct 16, 2006 4:20 am    Post subject: PIC --8(9) Reply with quote

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
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Mon Oct 16, 2006 5:09 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Oct 16, 2006 7:20 am    Post subject: Reply with quote

csprakash,

Check these links which explains in detail about edit masks

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/5.3.11.8.1?SHELF=&DT=20020920180651&CASE=

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/5.3.11.9.1?SHELF=&DT=20020920180651&CASE=

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group