× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

Exception Handling in R.08

  • assiddiqui
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 6 months ago #23002 by assiddiqui
Exception Handling in R.08 was created by assiddiqui
Hi,

I have an authorisation routine attached in VERSION.CONTROL which will extract detail and writes in text file in specific folder at FTP on authorisation of records. The records gets authorised but some times but rarely it will not generate text file at FTP, or its better to say that unable to find generated file at FTP.

I want to know that how can i identify that the file is generated or not, although there might be several reasons for that, one of them might be connectivity issues.

Is there is any option of Exception Handling to identity such reasons if file not generated due to any issue??

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G09-G13|TAFC:R05-R23|TAFJ:R19,R23:test
More
3 years 6 months ago #23003 by VK
Replied by VK on topic Exception Handling in R.08
Hi
post here the fragment of code that deals with the text file.

Cheers
VK

Please Log in or Create an account to join the conversation.

  • assiddiqui
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 6 months ago - 3 years 6 months ago #23005 by assiddiqui
Replied by assiddiqui on topic Exception Handling in R.08
Dear VK, thanks for your response, below are fragment of code. Please be noted that it might not happened regularly and files are generating most of the time, but sometimes it doesn't generate file on authorisation due to unknown reason.

FN.MF.TRADE = "F.MF.TRADE"
F.MF.TRADE = ""
CALL OPF(FN.MF.TRADE,F.MF.TRADE)

Y.L.MF.TRADE.ID = ID.NEW

IF (V$FUNCTION NE "R") THEN

Y.FOLDER.NAME = 'TEST.BP'
Y.FILE.NAME = "TRD.":Y.L.MF.TRADE.ID:".":TODAY:".txt"

Y.TEXT = Y.L.MF.TRADE.ID
Y.TEXT := '|'
Y.TEXT := R.NEW(MF.TRD.FUND.ID)
Y.TEXT := '|'
Y.TEXT := R.NEW(MF.TRD.PARTICIPATION.ACC)

OPENSEQ Y.FOLDER.NAME,Y.FILE.NAME TO FILE.POINTER THEN
END
WRITESEQ Y.TEXT ON FILE.POINTER THEN
END
END
Last edit: 3 years 6 months ago by assiddiqui.

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G09-G13|TAFC:R05-R23|TAFJ:R19,R23:test
More
3 years 6 months ago #23015 by VK
Replied by VK on topic Exception Handling in R.08
Hi

2 things

(1) you need to apply CREATE to create a file (though it's not mandatory - should be created on WRITESEQ)

(2) Crucial - use CLOSESEQ to commit your writes to the file.


see example here:

jbc.temenos.com/pages/create.html

P.S. I'd also recommend not to create text files in the folder that ends with ".BP" since such folders are dedicated to the source code.

Cheers
VK

Please Log in or Create an account to join the conversation.

  • assiddiqui
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 6 months ago #23024 by assiddiqui
Replied by assiddiqui on topic Exception Handling in R.08
Thankyou for your response.

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds