× Discuss about OFS, Temenos Connectors, Various OFS modes, OFS with Versions, OFS performance, Logging, EB.PHANTOM, OFS.SOURCE etc…

Single Threaded routine used in TSA service

  • sailen
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 6 months ago #13973 by sailen
Hi,

Can't we execute the AIX commands like mv (to move the files) and rm (remove) in the single threaded routine used for a TSA service? When I execute the program/routine from jshell, the AIX command used within the program/routine does work fine. However, when I execute the program as a TSA service, it doesn't work at all. I've attached a snippet of code used in my program as below:

PROGRAM XYZ
..........
..........

OPENPATH V.OUT.DIRPATH TO F.OUT.DIR THEN
V.OUT.FILENAME = V.IN.FILENAME:'.ofs'
IF ARR.MICR.OFS NE '' THEN
WRITE ARR.MICR.OFS TO F.OUT.DIR, V.OUT.FILENAME
* Move the processed files to another folder i.e, PROCESSED folder
V.MV.CMD = 'mv ':V.IN.DIRPATH:'/':V.IN.FILENAME:' ':V.PROCESSED.DIRPATH
EXECUTE V.MV.CMD
END
END ELSE
ABORT 201,'F.DIR'
END

Could you please help me in figuring out the issue?

Thanks in advance!
Sailendra

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

More
12 years 6 months ago #13974 by gm.saran
Replied by gm.saran on topic Single Threaded routine used in TSA service
Try to change the Single to Double Quotes.

Or else, put those commands in a Script and call the script (This works in Solaris and we use as below)

*
SEND.SMS.ALERT:
*
* DEBUG
SCR = "notify.sh ":TXN.REF
EXECUTE SCR

RETURN

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

  • sailen
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 6 months ago #13975 by sailen
Replied by sailen on topic Single Threaded routine used in TSA service
It's not working even after changing single quote to double quotes. However, I have also used another AIX command (ls) in the same program which is working fine.

V.LIST.CMD = "ls ":V.IN.DIRPATH
EXECUTE V.LIST.CMD CAPTURING V.TMP.LIST.FILES
The above statement does work well.

I have a doubt if I need to do any changes in PGM.FILE, BATCH, TSA.SERVICE or TSA.WORKLOAD.PROFILE after re-compiling the routine/program used in PGM.FILE.

Do you have any solution on this?

Thanks,
Sailendra

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

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
12 years 6 months ago #13976 by jpb
Try with trailing SH, e.g.
V.MV.CMD = 'SH -c mv ':V.IN.DIRPATH:'/':V.IN.FILENAME:' ':V.PROCESSED.DIRPATH

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

  • sailen
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 6 months ago #13977 by sailen
Replied by sailen on topic Single Threaded routine used in TSA service
Thanks for your reply.

It seems that the TSA service is using the old program/routine while running. I made some other changes in the same program and try to check if that change gets reflected while running as the service. But to my surprise, no any changes are being reflected while running as a service.

Can anyone suggest me how to clear the old program/routine from the cache (if any) so that the TSA service picks up the modified program/routine while running as a service?

For your reference, I already tried using CLEAR.FILE F.TSA.STATUS, and F.LOCKING.

Thanks in advance,
Sailendra Shrestha

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

More
12 years 6 months ago #13978 by gm.saran
Replied by gm.saran on topic Single Threaded routine used in TSA service
jshow -c RTN output? is it pointing to ONE or MORE? If its just one, try to restart the TSM in a fresh window. If jshow o/p is more than one, then you need to DECATALOG the unwanted one . . .

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

  • sailen
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 6 months ago #13979 by sailen
Replied by sailen on topic Single Threaded routine used in TSA service
jsh test1 ~ -->jshow -c E.GENERATE.MICR.OFS
Subroutine: /drt24test/test1/bnk/bnk.run/lib/lib35.so.118
jBC E.GENERATE.MICR.OFS version 10.0 Mon May 13 17:10:04 2013
jBC E.GENERATE.MICR.OFS source file NMB.BP
Executable: /drt24test/test1/bnk/bnk.run/bin/E.GENERATE.MICR.OFS.so
jBC main() version 10.0 Tue May 14 17:25:53 2013
jBC main() source file NMB.BP
Executable (DUP!!): /drt24test/test1/bnk/bnk.run/bin/E.GENERATE.MICR.OFS
jBC main() version 10.0 Tue May 14 17:25:53 2013
jBC main() source file NMB.BP

When I decataloged E.GENERATE.MICR.OFS using
DECATALOG NMB.BP E.GENERATE.MICR.OFS
and again cataloging the same program, it is again showing the same duplicate executable.
Do I need to remove one duplicate and if so how can i do that?

Thanks,
Sailendra

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

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
12 years 6 months ago #13980 by jpb
Obviously you are using a PROGRAM and not a SUBROUTINE:

- a program always has 2 entries with jshow !

- you can't use a PROGRAM from within T24 (neither command line nor service or elsewhere)

- change your routine to be a SUBROUTINE

- check the PGM.FILE record for your routine

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

More
12 years 6 months ago - 12 years 6 months ago #13981 by gm.saran
Replied by gm.saran on topic Single Threaded routine used in TSA service
DECATALOG twice and make sure jshow -c doesnt return any o/p.

Then as jpb suggested, change the PROGRAM to ROUTINE and then COMPILE it again. After this make sure, jshow returns only one o/p pointing to a SUBROUTINE. then u can restart the TSM in a new window and test
Last edit: 12 years 6 months ago by gm.saran.

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

  • sailen
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 6 months ago #13982 by sailen
Replied by sailen on topic Single Threaded routine used in TSA service
Thanks a lot. It works now.

Thanks Again !!!

Sailendra

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

Time to create page: 0.041 seconds