Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rejecting bad data files and emailing back to the partner 2

Status
Not open for further replies.

dinesh999

IS-IT--Management
Apr 25, 2008
6
0
0
US
Hi,

I have 2 output cards:

1st card (Reject) : with text field -
Rule =REJECT(Transaction #855 Inbound Partner Set V4010:#855<>F4010<>Inbound Partner Funct'lGroup ANSI:partner X12 Inbound Interchange:X12)

2nd Card (Command):

=Valid(PUT ( "EMAIL" ," -PR INET -TO vallabhanenidinesh@gmail.com <mailto:vallabhanenidinesh@gmail.com> -SUB Invalid File with Bad data -ATT attach.txt," ,
PACKAGE(Reject)), Fail("error sending email" + LASTERRORCODE()+": "+ LASTERRORMSG())


Please help me ASAP. Please

Thanks
Dinesh
)
 
Rejecting bad data files and email them back to the partner. Could you please tell me how to do that. is my approach positive?
 
I think you will need a -server in your email params though.
 
Thanks for your reply. I tried the above approach. Map rejects bad claims but it doesn't forward email to the partner.

Is there any other solution??
 
put a -T+ on your email to trace what is happening. I don't think you need this bit <mailto:vallabhanenidinesh@gmail.com>
What does the map log say? You need to look at all the diagnostics.
 
Your attachment won't work as the email processing usually takes place before the file from card 1 is created. You may need to do this in 2 maps or use PUT to create the reject file.
 
Don't think this bit's right either.
,PACKAGE(Reject))
 
Hi janhes,

Can i get your email id, please. I can send the map and the trees. Could you please look, modify and send back to me. Please help me.
 
Hi janhes,

Here is the trace file:
e-mail Adapter, Version 8.1(114)
Copyright © 2004, IBM Corporation. All rights reserved
Built for WIN32 - INTEL on Sep 15 2006 at 22:18:11.
Retry Count is 0. Retry Interval is 0. OnFailure is Rollback.
Fetch Unit is 0. Card Mode is Integral.
Will process 143 bytes of data.
Run Started at 09:07:32.628 on 05/08/08.
GetMailCoreInfo: Successful.
e-mail Adapter, Version 8.1(114)
Copyright © 2004, IBM Corporation. All rights reserved
Built for WIN32 - INTEL on Sep 15 2006 at 22:18:11.
Retry Count is 0. Retry Interval is 0. OnFailure is Rollback.
Fetch Unit is 0. Card Mode is Integral.
Will process 143 bytes of data.
Run Started at 09:07:32.630 on 05/08/08.
Options used: trace,name,subject,attach,server,to,name,proto
SMTP Gateway 'data' will be used.
e-mail Adapter, Version 8.1(114)
Copyright © 2004, IBM Corporation. All rights reserved
Built for WIN32 - INTEL on Sep 15 2006 at 22:18:11.
Retry Count is 0. Retry Interval is 0. OnFailure is Rollback.
Fetch Unit is 0. Card Mode is Integral.
Will process 143 bytes of data.
Run Started at 09:07:32.666 on 05/08/08.
GetMailCoreInfo: Successful.
[WSAStart: Entering]
[WSAStart: bWSStarted = 1, nWSClients = 1]
Sockets Client ID 2 enabled.
[WSAStart: Exiting (rc = 1)]
Wrote 143 bytes to C:\Users\dineshv\AppData\Local\Temp\D2FE.tmp.
Filename 'attach.txt' will be used in the outbound message.
Recipient #1 is vallabhanenidinesh@gmail.com.
Rollback specified; returning to map engine.
Cleanup call from prior Rollback; re-initializing instance storage.
Map return is 0.
Wrote Header: Date: Thu, 8 May 2008 09:07:32 -0700 (PDT)
Wrote Header: X-Mailer: IBM WebSphere DataStage 1.0.6
No valid From or Sender headers found (must be exactly one originator).
SMTPSendMessage: Error Processing File.
Attempt #1 failed, no more retries allowed.
Data in C:\Users\dineshv\AppData\Local\Temp\D2FE.tmp deleted.
Run Terminated at 09:07:32.695 on 05/08/08.
 
From your log...

'No valid From or Sender headers found (must be exactly one originator).'


This indicates that you must provide the '-FROM' parameter.
 
getting different error now. please need your suggestions.

Rule:
=Valid(PUT ( "EMAIL" ," -PR INET -SERVER 'LOCALHOST' -TO rudyg@gmail.com -FROM dineshv@gmail.com -ATTACH 'Bad Data.txt' -SUBJECT 'Files Contains Bad Data' -TEXT 'Please see the attatched text file' -T Emailtrace.dat"
,PACKAGE(Reject)), Fail("error sending email" + LASTERRORCODE()+": "+ LASTERRORMSG())
)

Trace File:
e-mail Adapter, Version 8.1(114)
Copyright © 2004, IBM Corporation. All rights reserved
Built for WIN32 - INTEL on Sep 15 2006 at 22:18:11.
Retry Count is 0. Retry Interval is 0. OnFailure is Rollback.
Fetch Unit is 0. Card Mode is Integral.
Will process 143 bytes of data.
Run Started at 09:57:28.781 on 05/20/08.
GetMailCoreInfo: Successful.
e-mail Adapter, Version 8.1(114)
Copyright © 2004, IBM Corporation. All rights reserved
Built for WIN32 - INTEL on Sep 15 2006 at 22:18:11.
Retry Count is 0. Retry Interval is 0. OnFailure is Rollback.
Fetch Unit is 0. Card Mode is Integral.
Will process 143 bytes of data.
Run Started at 09:57:28.782 on 05/20/08.
Options used: trace,name,subject,attach,text,server,to,name,from,name,proto
SMTP Gateway 'LOCALHOST' will be used.
e-mail Adapter, Version 8.1(114)
Copyright © 2004, IBM Corporation. All rights reserved
Built for WIN32 - INTEL on Sep 15 2006 at 22:18:11.
Retry Count is 0. Retry Interval is 0. OnFailure is Rollback.
Fetch Unit is 0. Card Mode is Integral.
Will process 143 bytes of data.
Run Started at 09:57:28.782 on 05/20/08.
GetMailCoreInfo: Successful.
[WSAStart: Entering]
[WSAStart: bWSStarted = 0, nWSClients = 0]
[WSAStart: Attempting WinSock initialization.]
[WSAStart: WinSock initialized successfully.]
Windows Sockets Version 1.1 will be used.
Windows Sockets Version 2.2 is supported.
Windows Socket Description is 'WinSock 2.0'.
Windows Socket System Status is 'Running'.
Windows Socket supports up to 32767 socket(s).
Windows Socket supports UDP datagram of up to 65467 bytes.
Windows Socket has no additional vendor-specific information.
Sockets Client ID 1 enabled.
[WSAStart: Exiting (rc = 1)]
Wrote 143 bytes to C:\Users\dineshv\AppData\Local\Temp\739B.tmp.
Filename 'Bad Data.txt' will be used in the outbound message.
Originator is dineshv@buy.com.
Recipient #1 is rudyg@buy.com.
Rollback specified; returning to map engine.
Cleanup call from prior Rollback; re-initializing instance storage.
Map return is 0.
Wrote Header: Date: Tue, 20 May 2008 09:57:28 -0700 (PDT)
Wrote Header: X-Mailer: IBM WebSphere DataStage 1.0.6
Local host is 'wsd-dineshv'.
Client host is 'buy.com'.
Server host is 'LOCALHOST'.
Connecting to 'LOCALHOST'.
Socket Opened.
WSAConnect: Connect refused.
No connection.
Socket Closed.
Connection closed.
Attempt #1 failed, no more retries allowed.
WSASelect: One or more of the descriptor sets contains an invalid socket.
WSASelect: One or more of the descriptor sets contains an invalid socket.
WSACloseSocket: Invalid socket descriptor.
[WSATerm: Entering]
[WSATerm: bWSStarted = 1, nWSClients = 1]
Sockets Client ID 1 disabled.
[WSATerm: nWSClients remaining = 0]
[WSATerm: Attempting WinSock shutdown.]
[WSATerm: Exiting]
[WSATerm: Entering]
[WSATerm: bWSStarted = 0, nWSClients = 0]
[WSATerm: Exiting -]
Data in C:\Users\dineshv\AppData\Local\Temp\739B.tmp deleted.
Run Terminated at 09:57:29.833 on 05/20/08.
 
If 'package()' doesn't work you can also try 'seriestottext()'.
 
Your trace shows WSAConnect: Connect refused.
Looks like you can't connect to the localhost.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top