Page 1 of 1

What is the use of H'00' ?

PostPosted: Fri May 21, 2010 2:51 pm
by diptisaini
Define data local
01 #ENTITY-STATUS-TYPE (A07)
01 REDEFINE #ENTITY-STATUS-TYPE
02 #ENTITY (A03)
02 #STATUS-IND (A01)
02 #MESSAGE-TYPE (A03)
END-DEFINE
FORMAT LS=120
INPUT #ENTITY-STATUS-TYPE
ASSIGN #STAT-REC-KEY-PU := #ENTITY
ASSIGN #ENTITY-KEY := #ENTITY
ASSIGN #STAT-FILLER-1 := 0
ASSIGN #STAT-FILLER-2 := 0
ASSIGN #STATUS-IND := H'00'

I just need to know what is meaning of ASSIGN #STATUS-IND := H'00' staement ?
Suppose if i am entering value for #ENTITY-STATUS-TYPE variable then i need to enter any for #STATUS-IND variablre or not ?

Re: What is the use of H'00' ?

PostPosted: Sat May 22, 2010 10:37 am
by RGZbrog
The statement
ASSIGN #STATUS-IND := H'00'
assigns the field to the value of hexadecimal 0, known in COBOL as LOW-VALUES. Not knowing your application, I can't explain why the program would replace the fourth position of a 7-character field that you just entered.