ADMIN REPROT

Hi Guru's

i have created(base of file taken from forum itself) a pmlfunc to output the db attribute please refer below  write

------------------------------------------------------------------------------------------------------

--ANB
-- Example of pml2 script

!Dbs = !!collectallfor(|DB|,||,!!CE)

-- declare an array

!result = array()
!P = CURRENT PROJECT
!projcode = 'Project Code =' & !p.code()
!ProjName = 'Project Name =' & !p.name()
var !name user
!name1 = 'Project User =' & !name
!Now = 'Date = ' & object DATETIME()
!result[1] = !projcode
!result[2] = !ProjName
!result[3] = !name1
!result[4] = !Now
!result[5] = ''
!result = ''
!result[7] = 'DBNAME' & ';' & 'DBTYPE' & ';' & 'DBNUM' & ';' & 'ACCESS' & ';' & 'FINO' & ';' & 'EXTNO' & ';' & 'DBFILE' & ';' & 'DESC'
!result = ''
do !DB values !Dbs
!result.append(!DB.DBNAME & |;| & !DB.TYPEDB & |;| & !DB.DBNUM & |;| & !DB.DBACCESS & |;| & !Db.FINO & |;| & !Db.EXTNO & |;| & !Db.DBFILE & |;| &!Db.DESC )
enddo
!file = object file(|%PDMSUSER%\DBReport.CSV|)
!file.writefile(|OVERWRITE|,!result)
!file.close()
syscom 'start excel.exe $!file&'

--------------------------------------------------------------------------------------------------------------

but the answer i am getting is very incorrect, my apologies i have poor skill in writing a macro language

could anyone please guide

Thanks in advance