PreviousNext
Help > Développement > Fonctions W-Langage pour AS/400 > Fonctions Gestion des Partages > ASServerShareInfoList >
Exemple

 

asServerShareInfoColl est un ASShareInfoCollection

 

HOuvreConnexion(MaConnexion1)  

SI PAS ASServerShareInfoList(asServerShareInfoColl,MaConnexion1) ALORS

       Info(ErreurInfo(errComplet))

SINON

           POUR TOUT asShareinfo DE asServerShareInfoColl
              Trace(
asShareinfo.shareName)
        
 FIN

FIN

 

strFilter est une chaîne = "HPDIJ*" //Filtre sur share name

asServerShareInfoColl..CollectionASShareInfo.SupprimeTout()

SI PAS ASServerShareInfoList(asServerShareInfoColl,MaConnexion1,strFilter) ALORS

       Info(ErreurInfo(errComplet))

SINON

         POUR TOUT asShareinfo DE asServerShareInfoColl
              Trace(
asShareinfo.shareName)
        
 FIN

FIN

HFermeConnexion(MaConnexion1)