On Fri, 24 Feb 2017 11:33:48 -0700, Sri h Kolusu wrote: >>>The following performs the operation with a single PARSE: > >It can be done without the value SPACE > >STR = "WORD1 WORD2.WORD3 WORD4:WORD5.WORD6 WORD7 HH.MM.SS" >PARSE VAR STR VAR1 ' ' VAR2 ' ' VAR3 ' ' VAR4 ' ' VAR5 '.' VAR6 '.' VAR7 > The SPACE() accounts for the likely eventuality that there be extra blanks as in the example I supplied:
> 18 *-* parse value space( INPUT ) with var1 " " var2 " " var3 " " >var4 " " var5 "." var6 "." var7 > >V> " word1 word2.word3 word4:word5.word6 word7 hh.mm.ss " > >>> "word1" > >>> "word2.word3" > >>> "word4:word5.word6" > >>> "word7" > >>> "hh" > >>> "mm" > >>> "ss" Did I overdesign? I thought I was just avoiding IBM's bad habit of solving only the most restricted problem the user reports and avoiding a desirable solution of a more general case. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
