× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am creating an RPG interface that will facilitate sending out emails.  In
creating this I realized that I may want to have more than one email being
created at one time in the same program, much like how you might have more
than one IFS file open in your program at any given time.

So now I am venturing into creating a descriptor of sorts so I can keep
track of different emails.  For instance it would look something like this:

D emlDescr1       s      10i 0
D emlDescr2       s      10i 0

/free
  emlDescr1 = newEmail()
    // emlDescr1 is equal to 0000000001
  emlDescr2 = newEmail()
    // emlDescr2 is equal to 0000000002

  addToAdr(emlDescr1:'me@yahoo.com')
  addToAdr(emlDescr2:'ITDept@helpdesk.com')

  error = sndEmail(emlDescr1)
  if error <> ' '
    sndEmail(emlDescr2)
  endif
/end-free

In the example above I would create two emails.  Each time the newEmail()
function was called I would increment a counter by 1 and send it back to the
calling program.  The way I was planning on storing them in my module was to
have an overlayed array called 'ToAdr' with the descriptor being the first
subfield so I could tell which addresses belonged to each email.  For
example:

     D                 DS                              inz
     D ToAdr                        266    dim(9999)
     D  Descr                        10i 0 overlay(ToAdr)
     D  Adr                         256    overlay(ToAdr:*next)

Has anybody ever done something similar to creating your own descriptors
before?  I am just trying to see if there is anything I should be watching
out for. . .

Aaron Bartell


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.