CAN WE USED LENGTH 4 IN PLACE LENGTH 2 ?
IF NOT THEN WHY?
Because it is defined by the system with a length of 2.
This isn't the definition of a 'year', but it is the definition of the QYEAR system value. If you use a system value, you must use the defined length.
The <help> text for the RTNVAR() parameter of the RTVSYSVAL command tells you the acceptable lengths of all system values.
As others have said, a 4-digit year value can be accessed in other ways, but not with QYEAR.
QYEAR is onlyh a 2 position value.
To get the century you would also need to retrievfe QCENTURY
Other options are to use the Job Date or Timestamp