Communitcation between the AS400, CloudFaxGateway and the TF400Gateway
From The TF400Gateway To The CloudFaxGateway
SFR - Scan Folder Request 7 Folder
AMR - Archive Message Request X Folder
LAR - Log Audit Request 214 AuditItem
IAR - Incoming Audit Request 50 uniqueId 14 receiveDate 48 message 40 callerid 40 destination 50 imagefile 8 pages 11 as400
TSR - Test Socket Request
FSU - Failed Status Update X Failed Status
From The CloudFaxGateway To The TF400Gateway
MQC - Message Queue Change 7 QueueFile 1 Type(MNQ,MOQ,QRU)
Reading the MOQ.txt
When the fax is queued to the cloud a file is created in the Queue directory to monitor it
eg C:\CloudFax400_Files\Queue\C0000277-208-moq.txt
Initially it contains one line:-
EP400P1<sep>0770320<sep>TF0770320-05/03/12-16:11/32461<sep>C0000279<sep>206<sep>EP400P1C
Once the CloudFax400 has queried this reference (TF0770320-05/03/12-16:11/32461), it will append any new updates to the file
For example
EP400P1<sep>0770320<sep>TF0770320-05/03/12-16:11/32461<sep>C0000279<sep>206<sep>EP400P1C Date=05032012161127,Attempt=0,Type=JobSubmit,StatusValue=13,Status=W,Description=Des...,Pages=0,Connect Time=0,CSI=ImpsCloud,Number=206,TryAgain= Date=05032012161141,Attempt=0,Type=JobSubmit,StatusValue=13,Status=R,Description=Mes...,Pages=0,Connect Time=0,CSI=ImpsCloud,Number=206,TryAgain= Date=05032012161200,Attempt=1,Type=JobDone,StatusValue=0,Status=S,Description= ok ...,Pages=1,Connect Time=0,CSI=ImpsCloud,Number=206,TryAgain=
This File is then handled by the following Routine in the TF400Gateway
The Gateway looks in the folder:-
D:\Program Files\TF400Gateway\TF400\Queue\ for fcq files. Each of these is a record of a message queued to the CloudFax400
eg, TF0770320-05_03_12-16+11-C0000279.fcq contains C0000279-206/0
The number after the / is the attempts that we've notified the as400 about so far (recorded attempts).
Associated Cloud File is \\grahamxp\c$\CloudFax400_Files\Queue\C0000279-206-moq.txt
Cloud File Contains <b>EP400P1<sep>0770320<sep>TF0770320-05/03/12-16:11/32461<sep>C0000279<sep>206<sep>EP400P1C
We then go through each line of the MOQ file comparing the Attempt number with the recorded attempts.
AssociatedCloudLine=date=05032012161127,attempt=0,type=jobsubmit,statusvalue=13,status=w,description=des..., [did 32376],pages=0,connect time=0,csi=impscloud,number=206,tryagain= strAttempt=0 0< 0?
AssociatedCloudLine=date=05032012161141,attempt=0,type=jobsubmit,statusvalue=13,status=r,description=mes..., status set to "r",pages=0,connect time=0,csi=impscloud,number=206,tryagain= strAttempt=0 0< 0?
AssociatedCloudLine=date=05032012161200,attempt=1,type=jobdone,statusvalue=0,status=s,description= ok...,pages=1,connect time=0,csi=impscloud,number=206,tryagain= strAttempt=1 0< 1?
Private Sub ProcessMOQMNQFromFolderName(strFolder As String) in the TFRequestHandler
Public Function HandleFaxCloudQ(strFile As String) As Integer in the QueueManager