Control JobStream BASH (Documentation Bugs and Problems)

by DickStomp ⌂ @, Europe Netherlands Sassenheim, Friday, February 17, 2017, 21:27 (612 days ago)

I build some jobstreams for bookkeeping
containing several steps
1) concat records of the bank BASH
2) convert records of the bank BASIC256
3) add costinfo to records BASIC256
4) sort records cost & date BASH
5) summing up records at cost BASIC256
6) formatting records for print BASIC256
7) print records with LibreOffice Writer
Problem is that the JOB Monthly Report stops after each BASIC256 program, waiting for me!
Then I have to close the BASIC256 with Alt+F4 to give control to BASH Job Stream that starts next step.
Is there another way to continue after ending the BASIC256??

--
it must be possible...

Control JobStream BASH

by Jim ⌂ @, Russell, KY, Saturday, February 18, 2017, 02:55 (611 days ago) @ DickStomp

Place use the "-a" option on the command line. This makes basic256 run in application mode and close when the program does.

Control JobStream BASH

by DickStomp ⌂ @, Europe Netherlands Sassenheim, Saturday, February 18, 2017, 13:27 (611 days ago) @ Jim

Dear Jim,
I tried
-r
-a
-r -a
-a -r
-ar
-ra
but none of the sets results in a "kill" of the .kbs by reaching "end".
Best regards,
Dick

--
it must be possible...

Control JobStream BASH

by DickStomp ⌂ @, Europe Netherlands Sassenheim, Saturday, February 18, 2017, 13:46 (611 days ago) @ DickStomp

Further testing in terminal Ubuntu14
$ basic256 -a gives "invalid option"
$ basic256 -r is OK

BASIC-256
version 1.1.2.3 (2014-05-13) - built with QT 5.2.1
Copyright © 2006-2014, The BASIC-256 Team

--
it must be possible...

Control JobStream BASH

by francisco, Sunday, June 10, 2018, 20:51 (134 days ago) @ DickStomp

I had the same problem. I added, at the beginning of each program, the lines:

system "ps -C basic256 -o start_time -o pid --sort start_time > basic-processes"
open 1, "basic-processes"
do
a$=readline (1)
w$ = explodex(a$,"[ ]* ") # explode separating by one or more blanks
current_process=int(w$[1])
until eof(1)
close 1

and, instead of the normal 'end', I put:

system "kill "+current_process

In this way, you can be programming with the Basic256 interpreter while launching your batches with Basic256 programs and everything works fine.

Greetings

Control JobStream BASH

by DickStomp ⌂ @, Europe Netherlands Sassenheim, Thursday, June 14, 2018, 05:37 (130 days ago) @ francisco

Dear francisco,

Thank you very much for your explanation.
That seems to be a clever solution!

I'm going to test it for my seven account streams, which are now rebuilded in LibreOffice Calc with the use of "Pivot Table". The most complicated job, attach "cost account" to each booking, is still not automated as with BASIC256...
I keep you informed.

Greetings,
Dick Stomp

--
it must be possible...

Control JobStream BASH

by DickStomp ⌂ @, Europe Netherlands Sassenheim, Wednesday, July 11, 2018, 18:48 (103 days ago) @ francisco

Dear Francisco,
It is for me impossible to repeat your solution.
I understand what you are trying to do.
But your
system "ps -C basic256 -o start_time -o pid --sort start_time > basic-processes"
delivers a file with one record containing "PGM PID".
And that is not the PID of the running Basic256...
I tried to discover with my BASH-Handbook what that system-statement brings. But I'm not familiar with such complicated BASH lines... Sorry!
But it is clear, that Basic END don't return the control to the system, so you want to KILL the Basic indeed, so that the next BASH-line in the batch can start the next Basic-prog.
Regards,
Dick

--
it must be possible...

Control JobStream BASH

by DickStomp ⌂ @, Europe Netherlands Sassenheim, Tuesday, July 24, 2018, 13:13 (90 days ago) @ Jim

Dear Jim,

Please look at following lines:

#! /bin/bash
# batch control of basic256 programs
basic256 basic_end.kbs
basic256 basic_end.kbs -a
basic256 basic_end.kbs -r
basic256 basic_end.kbs -a -r
basic256 basic_end.kbs -r -a

basic_end.kbs contains:
print "start"
end


the switch -r works fine
the switch -a works noway


each program must be stopped with the window close button
the end statement is never executed...

Please Help!

Best regards,
Dick

--
it must be possible...

RSS Feed of thread
powered by my little forum