dcl pic1 char(9) init ('ZZZZZZZZ9');
dcl pic2 char(7) init ('ZZ9V.99');
dcl num fixed dec (9) init (123456789);
z = edit (num, pic1); /* '123456789' */
z = edit (num, pic2); /* '789.00' */
z = edit (num, substr(pic1,8)); /* '89' */
z = edit (num, substr(pic2,1,5)); /* '789.' */
z = edit (num, substr(pic1,7,3)); /* '789' */
z = edit (num, substr(pic2,3,5)); /* '9.00' */
z = edit ('1', substr(pic1,7,3)); /* ' 1' */
z = edit ('PL/I', 'AAXA'); /* 'PL/I' */
z = edit ('PL/I', 'AAAA'); /* raises conversion */
If x cannot be edited into the picture specification given by y, the conditions raised are those that would be raised if x were assigned to a PICTURE data item which has the same picture specification contained in y.