Cyril,
I have tested in 7.6 with the code below:
-SET &ECHO = ALL ;
-SET &QT = '''';
-SET &org_list = 'TOM' | &QT | 'S' | '~' | 'LIST';
-SET &Q = BYTVAL('''', 'I4');
-SET &QQ = BYTVAL('~', 'I4');
-SET &org_list=CTRAN(&org_list.LENGTH,&org_list,&QQ,&Q,'A&org_list.LENGTH');
-*-SET &org_list = CTRAN(&ORG_LIST.LENGTH, &ORG_LIST, &QQ, &Q, 'A&ORG_LIST.LENGTH');
-TYPE &org_list
-EXIT
The output:
-SET &QT = '''';
-SET &org_list = 'TOM' | ' | 'S' | '~' | 'LIST';
-SET &Q = BYTVAL('''', 'I4');
-SET &QQ = BYTVAL('~', 'I4');
-SET &org_list=CTRAN(10,TOM'S~LIST,126,39,'A10');
-*-SET &org_list = CTRAN(&ORG_LIST.LENGTH, &ORG_LIST, &QQ, &Q, 'A&ORG_LIST.LENGTH');
-TYPE TOM'S'LIST
TOM'S'LIST
-EXIT
Your previous code, commented out, had &ORG_LIST in CAPS????
I am assuming &org_list is a passed variable; in lower case??
Tom
Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe