see the first one is declared as Char type. And Second one is declared as Varchar type. For Char type it is fixed. But where in case of Varchar its Variable length. i.e maximum is 20 char. Suppose in char type if u pass 'pavan' it takes 20 bytes and in varchar if u pass same 'pavan' it will take less than that. This is only one variable. Not a group element. And in COBOL we have upto 49 Level Number only. So if u mention 49 level means it cant have sublevels.
Hope this is wat u expected from us. Plz let me know if i am wrong..
posting same message two times cannot gain more attention or is that that important to post twice
take it cool or hot
the answer is here
if you want a variable of variable length then go for the varchar
the length s9(4) comp will store the length of the varchar after a value is assigned to it. so that that much length of string is drawn for your use when ever uu use that varchar. so......
either that is a pure syntax error
or it will get the whole length x(20) if its declared so.
so we willl get garbage value .....for the rest of the characters
but i dont think this wil happen.......
and
another option is
it can be treated as a character variable and
the one with out pic cclause above this variabe declaration may be treated as error
take the above post as example to this explanation.