Record count to be sent in Dssendmail subroutine
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 11
- Joined: Thu Jun 05, 2008 7:32 am
Record count to be sent in Dssendmail subroutine
I would like to send a mail to sourcing team about rejects. I am using Dssendmail subroutine in the after subroutine stage(xfm stage). i need to include the no of records rejected in this routine to be sent out in the mail.
My job design is
src----xfm---seq file
-
-
-
-
Reject seq file
My job design is
src----xfm---seq file
-
-
-
-
Reject seq file
-
- Participant
- Posts: 11
- Joined: Thu Jun 05, 2008 7:32 am
Record count in Dssendmail
its not the reject comes out of seq file. its from the xfm stage where records are rejected with a constraint set in xfm stage. using @outrownum i can have the number of records sent to reject file, but i have no clue as how this info can be included in the Dssendmail subroutinechulett wrote:What have you tried? And define 'rejects' in this context as sequential files don't typically generate reject records. ...
-
- Participant
- Posts: 11
- Joined: Thu Jun 05, 2008 7:32 am
this is how i code in the afterstage subroutine
From:abc@x.com\nTo:cba@x.com\nserver:x.com\nAttach:D:\Seq_reject.txt\nBody:%DSGetLinkInfo(DSJ.ME,DSJ.ME,DSJ.ME,DSJ.LINKROWCOUNT)% reject found \n%report%
can we use the DsFunction inside the body of the Dssendmail subroutine, if yes is the syntax right, i am not getting the desired output
Desired output is a mail sent to cba@x.com with the record count int the body of the mail.
From:abc@x.com\nTo:cba@x.com\nserver:x.com\nAttach:D:\Seq_reject.txt\nBody:%DSGetLinkInfo(DSJ.ME,DSJ.ME,DSJ.ME,DSJ.LINKROWCOUNT)% reject found \n%report%
can we use the DsFunction inside the body of the Dssendmail subroutine, if yes is the syntax right, i am not getting the desired output
Desired output is a mail sent to cba@x.com with the record count int the body of the mail.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 11
- Joined: Thu Jun 05, 2008 7:32 am
i need to send a mail to sourcing team, in the body of the mail i should mention 107 records have been rejected.
this count 107 should be inserted in the body of the mail
For sending the mail i am using Dssendmail routine in the afterstage subroutine
In the Dssendmail routine inside the body of the mail i am trying to use the function DSGetLinkInfo
so my code lookks like this
From:xyz@abc.com\nTo:.pqr@abc.com\nserver:abc.com\nAttach:D:\Seq_reject.txt\nBody: %DSGetLinkInfo(DSJ.ME,DSJ.ME,DSJ.ME,DSJ.LINKROWCOUNT)% rejects found \n%report%
Can we use Dsfunction inside body part of Dssendmail.
If yes is there something wrong with the syntax i have used.
I am not getting the desired output.
Instead the mail looks like this
%DSGetLinkInfo(DSJ.ME,DSJ.ME,DSJ.ME,DSJ.LINKROWCOUNT)% rejects found
Actually i intend to get 107 rejects found.
this count 107 should be inserted in the body of the mail
For sending the mail i am using Dssendmail routine in the afterstage subroutine
In the Dssendmail routine inside the body of the mail i am trying to use the function DSGetLinkInfo
so my code lookks like this
From:xyz@abc.com\nTo:.pqr@abc.com\nserver:abc.com\nAttach:D:\Seq_reject.txt\nBody: %DSGetLinkInfo(DSJ.ME,DSJ.ME,DSJ.ME,DSJ.LINKROWCOUNT)% rejects found \n%report%
Can we use Dsfunction inside body part of Dssendmail.
If yes is there something wrong with the syntax i have used.
I am not getting the desired output.
Instead the mail looks like this
%DSGetLinkInfo(DSJ.ME,DSJ.ME,DSJ.ME,DSJ.LINKROWCOUNT)% rejects found
Actually i intend to get 107 rejects found.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You need to obtain the results of DSGetLinkInfo() and concatenate that into the string. The string that you pass to DSSendMail() will therefore have a generating expression of the form
I'm not even 100% sure about that - you seem to have rather more "%" characters than necessary.
Code: Select all
"From:xyz@abc.com\nTo:.pqr@abc.com\nserver:abc.com\nAttach:D:\Seq_reject.txt\nBody: %" :DSGetLinkInfo(DSJ.ME,DSJ.ME,DSJ.ME,DSJ.LINKROWCOUNT) : "% rejects found \n%report%"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.