home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: InfoMgt
/
InfoMgt.zip
/
rolwps10.zip
/
roltorow.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-05-26
|
4KB
|
133 lines
/* Rolodex/2 to RoloWPS/2 */
rolodexfile = ""
rolowpsfile = ""
parse arg rolodexfile rolowpsfile extraarg
if ((rolodexfile = "") | (rolowpsfile = "")) then
do
say "dextowps.cmd rolodex/2.rol rolowps/2.rol"
exit(-1)
end
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
rolocheck = LINEIN(rolodexfile,1,1)
rolover = LINEIN(rolodexfile)
if ((rolocheck <> 'Rolodex') | (rolover <> 'Version 3.0')) then
do
say "This is not a rolodex/2 version 2.05 file"
exit(-1)
end
names.0 = LINEIN(rolodexfile)
if names.0 == '' then exit(-1)
tempfile = SysTempFileName(rolo????.tmp)
group1 = LINEIN(rolodexfile)
group2 = LINEIN(rolodexfile)
group3 = LINEIN(rolodexfile)
group4 = LINEIN(rolodexfile)
group5 = LINEIN(rolodexfile)
group6 = LINEIN(rolodexfile)
call lineout rolowpsfile, "RoloWPS"
call lineout rolowpsfile, "Version 1.0"
call lineout rolowpsfile, group1
call lineout rolowpsfile, group2
call lineout rolowpsfile, group3
call lineout rolowpsfile, group4
call lineout rolowpsfile, group5
call lineout rolowpsfile, group6
call lineout rolowpsfile, names.0
do count = 1 to names.0
names = LINEIN(rolodexfile)
mailnames = LINEIN(rolodexfile)
addresslength = LINEIN(rolodexfile)
addresss = CHARIN(rolodexfile,,addresslength)
status = LINEIN(rolodexfile)
citys = LINEIN(rolodexfile)
states = LINEIN(rolodexfile)
zips = LINEIN(rolodexfile)
companys = LINEIN(rolodexfile)
titles = LINEIN(rolodexfile)
phones = LINEIN(rolodexfile)
hphones = LINEIN(rolodexfile)
faxs = LINEIN(rolodexfile)
emails = LINEIN(rolodexfile)
ftps = LINEIN(rolodexfile)
bbss = LINEIN(rolodexfile)
notelength = LINEIN(rolodexfile)
notes = CHARIN(rolodexfile,,notelength)
status = LINEIN(rolodexfile)
group1s = LINEIN(rolodexfile)
group2s = LINEIN(rolodexfile)
group3s = LINEIN(rolodexfile)
group4s = LINEIN(rolodexfile)
group5s = LINEIN(rolodexfile)
group6s = LINEIN(rolodexfile)
first = ""
middle = ""
last = ""
parse var names last first middle
ok = lineout(tempfile, addresss, 1)
status = lineout(tempfile)
tempaddress1 = ""
tempaddress2 = ""
tempaddress3 = ""
tempaddress1 = linein(tempfile,1)
tempaddress2 = linein(tempfile)
tempaddress3 = linein(tempfile)
status = lineout(tempfile)
call lineout rolowpsfile, last
call lineout rolowpsfile, first
call lineout rolowpsfile, middle
call lineout rolowpsfile, mailnames
call lineout rolowpsfile, companys
call lineout rolowpsfile, titles
call lineout rolowpsfile, tempaddress1
call lineout rolowpsfile, tempaddress2
call lineout rolowpsfile, tempaddress3
call lineout rolowpsfile, citys
call lineout rolowpsfile, states
call lineout rolowpsfile, zips
call lineout rolowpsfile, " "
call lineout rolowpsfile, phones
call lineout rolowpsfile, hphones
call lineout rolowpsfile, faxs
call lineout rolowpsfile, emails
call lineout rolowpsfile, ftps
call lineout rolowpsfile, bbss
call lineout rolowpsfile, icons
call lineout rolowpsfile, group1s
call lineout rolowpsfile, group2s
call lineout rolowpsfile, group3s
call lineout rolowpsfile, group4s
call lineout rolowpsfile, group5s
call lineout rolowpsfile, group6s
notelength = LENGTH(notes)
call LINEOUT rolowpsfile, notelength
call LINEOUT rolowpsfile, notes
end
status = LINEOUT(rolodexfile)
status = LINEOUT(rolowpsfile)
call SysFileDelete tempfile
exit(0)