/* ============================================================= */
/* ============================================================= */
call RxFuncAdd SysLoadFuncs,RexxUtil,SysLoadFuncs
call SysLoadFuncs

parse arg accountName
delim  = d2c(1)

if length(accountName) < 1 then
	accountName = 'mail'

folderIndex = accountName'\folders.ndx'

do while lines(folderIndex) > 0 
   folderLine = linein(folderIndex)
   parse value folderLine with folderName''tabName''dir''rest
/*	  say '*('folderName')'delim'('tabName')'delim'('dir')'delim'('rest')' */
   rc = charout(,' 'folderName' ('dir'): ')

	eainfo = "DFFF00000100FDFF"x || d2c(length(folderLine))||"00"x||folderLine
	fname = accountName'\'dir'\folder.ndx'   
	rc = SysPutEA(fname, "MR2I.FOLDERINFO", eainfo)
	if rc \= 0 then
		say 'Error 'rc' encountered.'
	else
		say "set!"

end



