Because the win98 startup floppy has a boot menu, where you make the edits becomes significant.
For config.sys, the IDE section is as follows:
[IDE]
device=himem.sys /testmem

ff
device=emm386.exe noems
dos=high,umb
devicehigh=oakcdrom.sys /D:mscd001
rem oakcdrom is generic IDE (Atapi) driver
For a second cdrom, you must edit the oakcdrom.sys line by adding /D:mscd002
For autoexec.bat, the cdrom line is:
LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CDROM%
Edit this line, for the second cdrom, by adding /D:mscd002
The parameter /L:%CDROM% assigns the first available letter to the first cdrom drive, and the second drive takes the next letter. If you want your cdroms to come up as F: and G:, you can edit this parameter, but I'd suggest you not do it because F: might not be available. If this doesn't work for your DVD drive, it would be, as was pointed out, because the generic oakcdrom device driver doesn't support it, and you'll have to add its specific device driver to the config.sys file on a separate line just beneath the oadcdrom device driver. If this is the case, let us know and someone will explain how to do it. Don't worry about lastdrive=z because it's already on the startup floppy.