Mid-Michigan Computer Consultants - Bay City, Michigan

CONTENTS       (old style)
Mid-Michigan Computer Consultants
509 Center
Bay City, Michigan

Sales (989) 892-9242
Support (989) 686-8860

Plb-0375.cfm v1.0


ANSI Standard PL/B Language and Visual 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
      copyfile filename1,filename2
    repeat until ( zero ) 

Plb-0375.cfm v1.0

Write to MMCC Technical Support at:               Send e-mail to MMCC.
MMCC - Technical Support
600 W. Midland
Bay City, MI 48708
(989) 686-8860
© 1997 - 2024 MMCC - All Rights Reserved