I have a field with format A2 that can have values '00' to '99' and 'AA' to 'ZZ'. I am trying to define a new field which will be 0 if the value is numeric i.e. '00' to '99' and 1 if the value is alpha i.e. 'AA' to 'ZZ'. Now I'm using the following in define,
FLAG/I1 = IF SECTION IN ('00','01','02','03','04','05','06','07','08','09', '10','11','12','13','14','15','16','17','18','19', '20','21','22','23','24','25','26','27','28','29', '30','31','32','33','34','35','36','37','38','39', '40','41','42','43','44','45','46','47','48','49', '50','51','52','53','54','55','56','57','58','59', '60','61','62','63','64','65','66','67','68','69', '70','71','72','73','74','75','76','77','78','79', '80','81','82','83','84','85','86','87','88','89', '90','91','92','93','94','95','96','97','98','99') THEN 0 ELSE 1;
is there anyother way of achieving this.
Thanks in advance, pvparucThis message has been edited. Last edited by: pvparuc,
Release: Webfocus 7.6.11 OS/Platform: Windows Output: HTML, EXL2K
October 17, 2011, 02:08 PM
njsden
FLAG/I1 = CHKFMT(2, SECTION, '99', FLAG);
FLAG will contain 0 if both digits are numeric or a number with the position of the first non-numeric one found.