ANSI Standard PL/B Language and Visual PL/B
PL/B EXPLODE INSTRUCTION
April 22, 2011
The EXPLODE instruction is worth some attention.
This is a place holder for that discussion
From a discussion on the Sunbelt Forum 4/20/2011
From Stuart Elliott CenterStone, Inc.
Look at his use of EXPLODE in the following discussion of FINDDIR
and how he steps through the variable.
Regarding FINDDIR, This is what I do all the time:
sFNlist dim ^100
filename dim 260
filename1 dim 260
filename2 dim 260
nwork12 form 12
pack filename with "c:\data\*.*"
move n0 to nwork12
add "100" to nwork12 // make it bigger
dfree sFNlist // reset DIM
dmake sFNlist,nwork12 // make the target DIM
finddir filename to sFNlist,mode=2
repeat while ( eos ) // target DIM not big enough; try again
Then, to process the filename list:
explode sFNlist by "|" into filename
splice "",filename,1 // remove leading 'f'
pack filename1 with "c:\data\",filename
pack filename2 with "\\server\folder\",filename
repeat until ( zero )