OS/390 and coding for generational dataset using SMTPNOTE

Anybody familiar with this? I’m trying to email the most current generation dataset, but I’m not sure how to code it properly. Here are the dataset names, for example:

THIS.IS.THEONE
THIS.IS.THEONE.G0983V00
THIS.IS.THEONE.G0984V00
THIS.IS.THEONE.G0985V00
THIS.IS.THEONE.G0986V00
THIS.IS.THEONE.G0987V00

I want to email the 987 file. But SMTPNOTE doesn’t like the (0), or (+0) syntax in the dataset name. Any have experience with this? I can’t find anything in the SMP/E manuals, or on the web. The only examples listed for sending datasets are for regular ones. There must be a way to send the current dataset.
'XX’s to protect the innocent ;).

//--------------------------------------------------------------------
//
EMAILSTS: SEND REPORT TO EMAIL
//--------------------------------------------------------------------
//EMAILSTS EXEC PGM=XXTMP,REGION=7M
//

//SYSPROC DD DISP=SHR,DSN=XXX.XXXX.ISPCLIB
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SMTP2XX BATCH SUBJECT(**** Current Offsite Report ***) +
TO(XXXXXX@XXXXXXSMTP.XXXXX.COM) +
** DATASET(‘THIS.IS.THEONE’) **
//

So far I’ve tried:

** DATASET(‘THIS.IS.THEONE(0)’) **
** DATASET(‘THIS.IS.THEONE(0)’)) **
** DATASET(‘THIS.IS.THEONE(+0)’) **
** DATASET(‘THIS.IS.THEONE(+0)’)) **

Can’t really figure out how to pull in the current dataset. It works just fine for a regular dataset. Any ideas?

Seems the problem is that SMTPNOTE didn’t bother to allow you to use a normal DD for the input like a sane person would.

Anyways, the lazy way would be to add a copy step before this that copies from the latest generation GDG to a normal dataset. I’m sure SMTPNOTE would handle that, and you know the copy will accept (0) notation since it’s a normal DD step.

Didn’t even think of that. We need that smack smiley back. It should be able to handle the copy step as it would be totally separate of the email step. Thanks SmackFu!

I was using SmackFu’s solution to download files to an HP 3000 from an MRJE connection back in 1981. If you need to make it dynamic, you can also use REXX (invoking an IDCAMS routine) to resolve the G000V00 dynamically.