× 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...

Executing Shell command in routine ?

  • Moe_T24
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • T24 Technical
More
8 years 8 months ago - 8 years 8 months ago #20621 by Moe_T24
Executing Shell command in routine ? was created by Moe_T24
Hi guys ,

I'm trying to concat some extracted files in one file using a batch job routine .
When I run the service in DEBUG mode , and reach the line that executes the command
CMD = 'SH "cat ': FULL.NAME : '.txt.' : TODAY :'.*' : '>>':'/home/t24user/Extract/stmt':'.txt.':TODAY:'"'

I get the follwoing error :
Cannot find file /glodev5/r15upd/r15upd/bnk/bnk.run/tmp/R15_DAT_Interface_1.SOURCE/SH
Please enter the full path to the source or 'I' to ignore.

I don't know what is this path, and how to fix it ?
P.S : I'm using TAFJ R15

Any ideas ??!!

Best Regards
Last edit: 8 years 8 months ago by Moe_T24.

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
8 years 8 months ago #20622 by VK
Replied by VK on topic Executing Shell command in routine ?
Hi
Looks like you're under Linux or Unix; why then "SH" in upper case?

also, what the following commands show? (I quote the TAFC analog, don't know what's in TAFJ):

jshow -c SH
CT VOC SH

Cheers
VK

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

  • Moe_T24
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • T24 Technical
More
8 years 7 months ago #20629 by Moe_T24
Replied by Moe_T24 on topic Executing Shell command in routine ?
Hi VK ,

Yes I'm under Unix . This was originally a TAFC routine , then I tried to compile and run on TAFJ .

when I run tShow -c SH (equiv. to jShow ) , I get the following :

Project : 'xxxx' [MISSING]
No such routine : '-c' (com.temenos.t24._m_c_1_cl.class)
[ FOUND ]
BASIC source : '/glodev5/r15upd/r15upd/bnk/bnk.run/tmp/R15_DAT_Interface_1.SOURCE/SH'
BASIC package : ''
BASIC Import(s) : 'com.temenos.t24'
JAVA class : 'file:/home/t24user/'xxxx' /jars/t24lib/DAT_Interface.jar!/com/temenos/t24/SH_cl.class'
Compiled the : 03 Jul 2015 15:46:47
on : maa2devax4
Compiled with TAFJ : R15_SP2.0
Timestamp : 1435918607632
Grammar : 3
Include Basic Replacement : false

Best Regards

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
8 years 7 months ago - 8 years 7 months ago #20631 by VK
Replied by VK on topic Executing Shell command in routine ?
Hi
it looks that what was SH executable under TAFC (compiled jBC code) is now Java class...

I afraid you either have to find the way to run the native cat command (probably via shell script) or to CALLJ SH class...

Or maybe, use jBC READSEQ..WRITESEQ to copy file contents.

Cheers
VK
Last edit: 8 years 7 months ago by VK.

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

  • subhashmurali
  • Visitor
  • Visitor
8 years 5 months ago #20919 by subhashmurali
Replied by subhashmurali on topic Executing Shell command in routine ?
Hi VK,

Hope you are doing good.

I am trying to perform EXECUTE command in TAFJ routine, however I can see the script is running (as it is taking sometime) but CAPTURING variable doesn't return any values. I have tried RETURNING variable also it didn't work. Appreciate if you could through some light on this returning values.

Thanks,
Murali

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
8 years 5 months ago #20921 by VK
Replied by VK on topic Executing Shell command in routine ?
Hi
I'm OK thank you.
Can you try to redirect the output of your script to a file. To be able to use redirection, you need to use "Korn shell" mode (see jbc.temenos.com/pages/execute.html). It works even under Windows.
e.g.:
EXECUTE CHAR(255) : 'kWHERE (VN > file.txt'
.. and see if there's anything in file.txt...

Cheers
VK
The following user(s) said Thank You: subhashmurali

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

  • Ashwini04
  • Visitor
  • Visitor
6 years 4 months ago #22045 by Ashwini04
Replied by Ashwini04 on topic Executing Shell command in routine ?
Hi Guys ,

I have a doubt while executing a shell script in TAFJ

Please find below the program

PROGRAM TEST.GET.SYSTEM.INFO
EXECUTE "SH -c proc.sh" CAPTURING OUTPUT
CRT OUTPUT
END

I tried to run this program , but I am getting empty output. But when I run the script "proc.sh" in the TAFJ environmnent, I am able
to get the output

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
6 years 4 months ago #22051 by VK
Replied by VK on topic Executing Shell command in routine ?
Hi
Looks like TAFJ does not support CAPTURING option... Try to redirect the output as I suggested in one of the messages above.

Cheers
VK

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

Time to create page: 0.061 seconds