Scipt which starts a Program only when another program is running
Hello again.
I want to activate compiz-fusion, but reactivate kwin when playing games on wine (caus fps will break down very hard when compiz is running).
Ive read lots of forums and tutorials and scripted this scipt, which runs fine and smoothy.
BUT when he activates for example "kwin --repalce", the output from kwin blocks further walking thrugh the script and it "hangs"
Do anyone of you has ideas to solve my problem. I welcome completly other ideas of solving my quest, too.
Thanks a lot !
#!/bin/bash
while [ '1' = '1' ]
do
if [ $( ps aux | grep -c wineserver ) = '1' ]
then
#WINE LÄUFT NICHT
if [ $( ps aux | grep -c compiz ) = '1' ]
then
echo Wine lauft nicht und compiz soll gestartet werden
compiz --replace --sm-disable --ignore-desktop-hints ccp
fi
else
#WINE LÄUFT
if [ $( ps aux | grep -c kwin ) = '1' ]
then
echo Wine lauft und kwin soll gestartet werden
kwin --replace
fi
fi
sleep 2
done
Last edited by stonix_015 (2012-02-16 19:59:06)
pmd wrote:
This can solve your problem:
kwin --replace &
But I'm not sure if it will
If you are wondering where your post went; It seems you hit the 'report' link, not the 'reply' link. (about 15 minutes ago)
Similar Messages
-
I have one itunes account with two phones assigned to it, sons and daughters, (5s). When i phone one of the numbers both phones have started to ring, only when connected to wifi at home. The problem does not occur when not connected to wifi. How do i resolve this please? texting is fine it is only when ringing one of the numbers.
<http://support.apple.com/kb/HT6337>
"To turn off iPhone Cellular Calls on a device, go to Settings > FaceTime and turn off iPhone Cellular Calls." -
Start automatically an action only when another action finish
Hi all,
first, sorry for my bad English....
I am an Italian Architect, I use Photoshop actions mostly to manage many big tiff files.
I try to solve this problem since long time.... but so far I can't.. :-(
This is my problem: I woul'd like to use some actions in sequence launcing only the first one, and when the first finish the second starts automatically, when the second finish, the third starts automatically, and so on.
Example
I have 3 actions and a folder "X" that contain tiff files:
I launch action "A" that resize, colorize, etc tiffs files in folder "X" and put them in a folder "Y"
only WHEN action "A" finish........
action "B" starts and works in folder "Y", grouping logically tiff files in some layerized PSD files and putting them in folder "Z"
only WHEN action "B" finish........
action "C" starts and works on PSD files in folder "Z" doing some "save as" at different resolution in some folders (folder "JPG", folder "PDF", etc)
I hope to explain clearly my problem.
Thanks a lot
EmanuelaHi Mylenium,
I will try to call existing actions creating a new one (?), but I tell you that I don't understand your question "Does that not give the same result, just only per individual file?"
thanks
Emanuela -
Have Image Restore only when another object is selected
I have a menu of images at the top. When the mouse rolls over
them a new layer appears on the page according to which logo was
rolled over. When the mouse rolls over the image(s) i want Two
things to happen 1) Image changes from gray scale to color (easy,
rollover image) but 2) I want the image to remain color even when
the mouse is not over it and only change back to gray scale when
another image at the top is rolled over. Currently the image will
only stay color when the mouse is over it. I need the corresponding
image to remain in color when its layer is in view. I have thought
of a few ways to do this with putting each image in a layer but i
want an easier way. Any suggestions? Thanks in advance!Is this possible? Am I clear on what i want?
-
Read Program code from another program
Hi,
I would like have ABAP code which reads another program and displays the coding of it.
Regards,
VijayakumarHI,
The SUBMIT statement accesses an executable program rep. The executable program is executed as described under Calling Executable Reports.
The program name rep can either be specified directly or as the content of a character-like data object name. The data object name must contain the name of the program to be accessed in block capitals. If the program specified in name is not found, an irretrievable exception is generated.
The selscreen_options additions can be used to determine the selection screen for the program accessed and to supply it with values.
The list_options additions allow you to influence the output medium and the page size in the basic list for the program accessed.
You can schedule the program for background processing by specifying job_options.
Addition
... AND RETURN
Effect
The AND RETURN addition determines the object accessed by the runtime environment after program access is completed:
Without the AND RETURN addition, the internal session of the program accessed replaces the internal session of the calling program in the same position in the call sequence. Once program access is completed, the system returns to before the position from which the calling program was started.
As of Release 6.10, the content of the system field sy-calld at SUBMIT is copied by the calling program without AND RETURN. Before 6.10, the system entered the value "X", which was incorrect when the program was accessed from the first program in a call sequence.
The addition AND RETURN starts the executable program in a new internal session. The session for the calling program is retained. Once program access is completed, program execution for the calling program continues after the SUBMIT statement.
Note
When the SUBMIT statement is executed, the system runs an authorization check for the authorization group specified in the program attributes.
Regards,
Sunil Kumar Mutyala................... -
Can we restict a transaction when another transaction is running
Hi All,
1. Is there any way to trace which particular transaction is running? say SE38, not user specific, globally? It has to be traced programmatically.
2. Is it possible to restrict another transaction when one transaction is running. For eg. I want that when ST05 will run, SE38 should not run.
3. Is there any transaction to create custom event that will run autometically to restrict other transaction from running when one particular transaction is running.
Looking for your valuable suggestion/s.
Thanks and regards,
Atanu
Message was edited by: Atanu DeyHi!
I appreciate the valuable effort you have given to analyze the problem. I will be more specific with my requirement. It says:
When we run transaction EA10 to create mass bills or invoice, the transaction is running fine even for multiple users firing lot of data in the production system.
But, but, when someone is trying to run transaction FPMA to do autometic clearing for some business partner/s the transaction EA10 is throwing error as Mass Block.
Reason: One table in EA10 transaction is getting locked during updation, more logical. But second transaction is trying to fetch data from same table just hindering the process.
Probable solution: Do not allow to run transaction FPMA when transaction EA10 is running. After total execution, allow to run the other transaction.
Both of them are creating background job runtime and processing as well. Stop other job running when previous job is active. SAP program, no change/s allowed. (
Any more suggestion please. (
Best wishes,
Atanu -
We have to stop one job when another job is running
Hi,
I have a new Requirement. There are two jobs running in background one is delta load and another one is Full load. Delta load runs for every two hours( Daily 12 loads) and full load runs on sundays(weekly only one load) for 6hrs. Now what happening is Full load and delta load are running on same time i.e when the full load is running, delta loads are also running on the same time, Full load runs for 6 hrs and 3 Delta loads runs on same time. Now we have a requirement to stop the delta loads when full load is running. Is there any posibility how to stop the delta load.
Rgds
Kishorhi Kishor,
check this
Re: How to Cancel a ACTIVE background Job scheduled in SM37.
hope it will help you.
thanks
Sachin -
Why does my custom device break only when VeriStand tries to run it?
Hello,
I have a custom device, it's been working for awhile now, today I made some changes to add some more functionality and now VeriStand tells me the RT driver is no longer executable.
I didn't change my build configuration or add any functionas that might bring in some external DLL or something that might be linking incorrectly.
Any thoughts to how I might go about narrowing this down. The problem is only at runtime in VeriStand. The built LLB has no issues, the development source has no issues, it's only when VeriStand tries to deploy that there is an issue so there has to be something that's not linked properly yes?
The system is not RT, it's just deploying on Windows using a PXIe.
Post CLD and when I'm a CLA when someone asks who I am, I can spin around in my chair and say "I am... the architect."
Solved!
Go to Solution.I don't know for sure the exact cause, but I ended up just eliminating portions of the driver code piece by piece to narrow down what was causing the issue. It turned out to be a debug VI that I've used many times before in various projects, but which contains the "Call Chain" LabVIEW primitive, but aside from that, it's just some simple string manipulation. So I don't know if it was just some random edge case that only occurred when executing under VeriStand's own underlying LabVIEW code but for whatever reason, it was breaking the driver VI.
So, solved the problem, but the cause, I can't quite say.
Post CLD and when I'm a CLA when someone asks who I am, I can spin around in my chair and say "I am... the architect." -
Program freezes when a thread is run in another class.
I have a class that extends Thread, and then I have a GUI that needs this thread.
The thread class looks like this:
public class ScoreboardCheck extends Thread
private int clock;
private boolean running;
public ScoreboardCheck(int timeOnClock)
super();
this.clock = timeOnClock;
running = false;
public int getClock()
return this.clock;
public void toggleRunning()
if (running == false)
running = true;
else
running = false;
public void run()
while (Thread.currentThread() == this)
if (running == true)
try
Thread.sleep(1000);
clock--;
catch(InterruptedException ie)
ie.printStackTrace();
}This is suppose to update the clock on the GUI. I instantiate the thread in the GUI class, and call start on it. This works fine, but whenever I call run, it freezes up....Either way it never does anything.
In the GUI class, how am I suppose to continously update the clock without this thing freezing up? I've tried implementing runnable in the GUI class, but that didn't work.Thanks for the replies, guys.
When I call start it doesn't freeze. That's good. The only other problem I'm faced with, is updating the GUI probably every second. I've tried using a run method in the GUI which runs while true, but that froze things up....This is the point I'm stuck at. For now, I'm going to try what someone suggested: the Timer class. Is there another way of doing this though? Without the timer? -
How to make form as read only when another time as user sees it..
Hi All,
I have a form to raise the issue. once the issue is raised it appears in the issue raised reports( that is form on a report )
so all can view this report and click on issue no ..the form with details appear .
but i want to restrict it , by allowing only one up manager to view the form on a report in editable format rest all can just view it .
how can i do this?????????
can any one help me with this ????..
my approach is like this ...
a column called "checked shud be added to issue table , then its values must be set to "raised" when issue is submitted for the very first time..( so it is zero when the end user is submitting it ).
when ( the logged in user =1 up manager or checked!="raised") then
form fields to be displayed as edited
else
form fields need to be read only .
Thanks & Regards,
Nandini Thakur.
Edited by: Nandini thakur on Jun 26, 2010 12:04 PMNandini,
If you edit any item, you can see a section where you can specify "Read-Only" condition. Here you can write your read-only logic using SQL OR PL/SQL or predefined conditions.
Cheers,
Hari -
Trouble getting a JMF program working with another program
hello.
my name is james mcfadden. i am having difficulty compiling the first program (a menu GUI) here. even though the second program (the JMF program) can be compiled and runned as a separate application, i'm trying to get be able to use the first program to run the second program. when i compile the first program i get the following errors. i don't know what are causing these errors?
----jGRASP exec: javac -g X:\CP4B Project\Demo.java
Demo.java:284: cannot find symbol
symbol : constructor Media()
location: class Media
Media media=new Media();
^
Demo.java:288: cannot find symbol
symbol : constructor Media()
location: class Media
Media media=new Media();
^
Demo.java:292: cannot find symbol
symbol : constructor Media()
location: class Media
Media media=new Media();
^
3 errors
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
//Written by:Seamus McFadden
//Class:CP4B
//Program Number:1
//Program Name:Demo.java
//Description:
//Supervisor:Gerard McCloskey
import java.awt.*;//Contains all of the classes for creating user interfaces and for painting graphics and images
import java.awt.event.*;//Provides interfaces and classes for dealing with different types of events fired by AWT components
import javax.swing.*;//Provides a set of lightweight components that, to the maximum degree possible, work the same on all platforms
public class Demo extends JFrame{
public static void main(String[] args){
int choice=-1;//a variable of type int that is set to -1
do{
choice=getChoice();//invokes the method getChoice()
if(choice!=0){
getSelected(choice);//invokes the method getSelected(choice)
}//end if
//if the user chooses 4, it will cause him or her to exit the system
}while(choice!=5);//end do-while
System.exit(0);//closes down the menu screen
}//end main
public static int getChoice(){
String choice;//a variable of type string
int ch;//a variable of type int
choice=JOptionPane.showInputDialog(null,
"1. Product Menu\n" +
"2. Member Menu\n" +
"3. Rental Menu\n" +
"4. Media Menu\n" +
"5. Log Off\n\n" +
"Enter your choice");//asks the user for some input
ch=Integer.parseInt(choice);//a class that wraps a value of the primitive type int in an object
return ch;//a method that returns an integer value
}//end getChoice
public static void getSelected(int choice){
if(choice == 1) {
product();
}//end if
if(choice==2){
member();
}//end if
if(choice==3){
rental();
}//end if
if(choice==4){
media();
}//end if
}//end getSelected
public static void product(){
int productChoice=-1;//a variable of type int that is set to -1
productChoice=getProductChoice();//invokes the method getChoice()
if(productChoice!=0){
getProductSelected(productChoice);//invokes the method getSelected(choice)
}//end if
System.exit(0);//closes down the menu screen
public static void member(){
int memberChoice=-1;//a variable of type int that is set to -1
memberChoice=getMemberChoice();//invokes the method getChoice()
if(memberChoice!=0){
getMemberSelected(memberChoice);//invokes the method getSelected(choice)
}//end if
System.exit(0);//closes down the menu screen
public static void rental(){
int rentalChoice=-1;//a variable of type int that is set to -1
rentalChoice=getRentalChoice();//invokes the method getChoice()
if(rentalChoice!=0){
getRentalSelected(rentalChoice);//invokes the method getSelected(choice)
}//end if
System.exit(0);//closes down the menu screen
public static void media(){
int mediaChoice=-1;//a variable of type int that is set to -1
mediaChoice=getMediaChoice();//invokes the method getChoice()
if(mediaChoice!=0){
getMediaSelected(mediaChoice);//invokes the method getSelected(choice)
}//end if
System.exit(0);//closes down the menu screen
public static int getProductChoice(){
String productChoice;//a variable of type string
int pch;//a variable of type int
productChoice=JOptionPane.showInputDialog(null,
"1. Add product details\n" +
"2. View product details\n" +
"3. Edit product details\n" +
"4. Delete product details\n" +
"5. Exit\n\n" +
"Enter your choice");//asks the user for some input
pch=Integer.parseInt(productChoice);//a class that wraps a value of the primitive type int in an object
return pch;//a method that returns an integer value
}//end getChoice
public static int getMemberChoice(){
String memberChoice;//a variable of type string
int mch;//a variable of type int
memberChoice=JOptionPane.showInputDialog(null,
"1. Add member details\n" +
"2. View member details\n" +
"3. Edit member details\n" +
"4. Delete member details\n" +
"5. Exit\n\n" +
"Enter your choice");//asks the user for some input
mch=Integer.parseInt(memberChoice);//a class that wraps a value of the primitive type int in an object
return mch;//a method that returns an integer value
}//end getChoice
public static int getRentalChoice(){
String rentalChoice;//a variable of type string
int rch;//a variable of type int
rentalChoice=JOptionPane.showInputDialog(null,
"1. Add rental details\n" +
"2. View rental details\n" +
"3. Edit rental details\n" +
"4. Delete rental details\n" +
"5. Exit\n\n" +
"Enter your choice");//asks the user for some input
rch=Integer.parseInt(rentalChoice);//a class that wraps a value of the primitive type int in an object
return rch;//a method that returns an integer value
}//end getChoice
public static int getMediaChoice(){
String mediaChoice;//a variable of type string
int mtch;//a variable of type int
mediaChoice=JOptionPane.showInputDialog(null,
"1. Listen to songs\n" +
"2. View movie previews\n" +
"3. View game previews\n" +
"4. Exit\n\n" +
"Enter your choice");//asks the user for some input
mtch=Integer.parseInt(mediaChoice);//a class that wraps a value of the primitive type int in an object
return mtch;//a method that returns an integer value
}//end getChoice
public static void getProductSelected(int productChoice){
if(productChoice==1){
addProducts();
}//end if
if(productChoice==2){
viewProducts();
}//end if
if(productChoice==3){
editProducts();
}//end if
if(productChoice==4){
deleteProducts();
}//end if
}//end getSelected
public static void getMemberSelected(int memberChoice){
if(memberChoice==1){
addMembers();
}//end if
if(memberChoice==2){
viewMembers();
}//end if
if(memberChoice==3){
editMembers();
}//end if
if(memberChoice==4){
deleteMembers();
}//end if
}//end getSelected
public static void getRentalSelected(int rentalChoice){
if(rentalChoice==1){
addRentals();
}//end if
if(rentalChoice==2){
viewRentals();
}//end if
if(rentalChoice==3){
editRentals();
}//end if
if(rentalChoice==4){
deleteRentals();
}//end if
}//end getSelected
public static void getMediaSelected(int mediaChoice){
if(mediaChoice==1){
hearSongs();
}//end if
if(mediaChoice==2){
viewMovies();
}//end if
if(mediaChoice==3){
viewGames();
}//end if
}//end getSelected
public static void addProducts(){
ProductForm product=new ProductForm();
product.getInput();
product.setVisible(true);
public static void viewProducts(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editProducts(){
ProductForm product=new ProductForm();
product.getInput();
product.setVisible(true);
public static void deleteProducts(){
ProductForm product=new ProductForm();
product.setVisible(true);
public static void addMembers(){
MemberForm member=new MemberForm();
member.getInput();
member.setVisible(true);
public static void viewMembers(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editMembers(){
MemberForm member=new MemberForm();
member.getInput();
member.setVisible(true);
public static void deleteMembers(){
MemberForm member=new MemberForm();
member.setVisible(true);
public static void addRentals(){
RentalForm rental=new RentalForm();
rental.getInput();
rental.setVisible(true);
public static void viewRentals(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editRentals(){
RentalForm rental=new RentalForm();
rental.getInput();
rental.setVisible(true);
public static void deleteRentals(){
RentalForm rental=new RentalForm();
rental.setVisible(true);
public static void hearSongs(){
Media media=new Media();
public static void viewMovies(){
Media media=new Media();
public static void viewGames(){
Media media=new Media();
}//end class Demo
import java.awt.BorderLayout;
import java.awt.Component;
import java.io.IOException;
import java.net.URL;
import javax.media.CannotRealizeException;
import javax.media.Manager;
import javax.media.NoPlayerException;
import javax.media.Player;
import javax.swing.JPanel;
import java.io.File;
import java.net.MalformedURLException;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
public class Media extends JPanel{
public Media(URL mediaURL){
setLayout(new BorderLayout());//use a BorderLayout
//Use lightweight components for Swing compatibility
Manager.setHint(Manager.LIGHTWEIGHT_RENDERER,true);
try{
//create a player to play the media specified in the URL
Player mediaPlayer=Manager.createRealizedPlayer(mediaURL);
//get the components for the video and the playback controls
Component video=mediaPlayer.getVisualComponent();
Component controls=mediaPlayer.getControlPanelComponent();
if(video!=null)
add(video,BorderLayout.CENTER);//add video component
if(controls!=null)
add(controls,BorderLayout.SOUTH);//add controls
mediaPlayer.start();//start playing the media clip
}//end try
catch(NoPlayerException noPlayerException){
System.err.println("No media player found");
}//end catch
catch(CannotRealizeException cannotRealizeException){
System.err.println("Could not realize media player");
}//end catch
catch(IOException iOException){
System.err.println("Error reading from the source");
}//end catch
}//end Media constructor
// launch the application
public static void main( String args[] ) {
// create a file chooser
JFileChooser fileChooser = new JFileChooser();
// show open file dialog
int result = fileChooser.showOpenDialog( null );
if ( result == JFileChooser.APPROVE_OPTION ) {
URL mediaURL = null;
try {
// get the file as URL
mediaURL = fileChooser.getSelectedFile().toURL();
} // end try
catch ( MalformedURLException malformedURLException ) {
System.err.println( "Could not create URL for the file" );
} // end catch
if ( mediaURL != null ) {
JFrame mediaTest = new JFrame( "Media Tester" );
mediaTest.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
Media mediaPanel = new Media( mediaURL );
mediaTest.add( mediaPanel );
mediaTest.setSize( 300, 300 );
mediaTest.setVisible( true );
} // end inner if
} // end outer if
} // end main
}hello.
thanks for the reply. how do i create argument
constructors in Java?Please re-read my post ... you already have one. If you want to use it, simply pass in the argument to it that it wants. In this case it wants a URL (Universal Resource Locator). Please check out the java.net.URL package in the [url http://java.sun.com/javase/6/docs/api/]API doco.
You can build a URL like this:
URL url = getClass().getResource( "textfile.txt" ); // Just an example - where the file resides in the same location as the class file. -
Execute a java program from an another program
Like we can compile a code from wihin a java file by using the following :
Tool javac = ToolProvider.getSystemJavaCompiler();
Similarly,can we execute i.e. run a java program from within a java file i.e. running d java command from within the java file ??If yes then please tell me how??suppose on the Unix box or from a Unix script ( korn, perl, bourne, bash) you can run the following java program
java ${JAVA_OPTS} -jar ${GMR_APPS_DIR}/risk.jar -I -c ${COB} -r ${BATCH} -o ${XML_DIR}
in java you can do the following :
Runtime rt = Runtime.getRuntime();
try {
Process process = rt.exec("java ${JAVA_OPTS} -jar ${GMR_APPS_DIR}/risk.jar -I -c ${COB} -r ${BATCH} -o ${XML_DIR}
// OR
Process process = rt.exec("/export/apps/Tools/apache-tomcat-5.5.17/bin/startup.sh");
// process.destroy(); if you want to kill the process
process.waitFor();
int RC = process.exitValue();
System.out.println(returnOutput(process.getErrorStream()));
System.out.println(returnOutput(process.getInputStream()));
} catch (Exception ex) {
ex.printStackTrace();
empty the output stream from the script
private String returnOutput(InputStream is) throws Exception {
String s;
StringBuffer strBuff = new StringBuffer();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
while ((s = br.readLine()) != null) {
strBuff.append(s);
return strBuff.toString();
}You need to relace the ${} by the appropriate values.
Regards,
Alan Mehio
London, UK
Edited by: alan_mehio on Jan 16, 2008 4:21 PM -
Error is thrown ONLY when the job is run doe delivery creation
Dear SDNres,
I am facing a tricky issue.
I have a job that creates Sales order , Delivery, Billing.
When the sales order contains line items <=8 then the job runs fine and creates delivery successfully
When the sales order contains line items more than 8, then the job fails on delivery creation and the BDC captures error "customised error''
Doubt:
steps in manual creation:
1)I create a Sales order with line items > 8
2)then i create delivery manually .
After the above 2 steps i dont get the error at all in case of manual creation
But the same steps when the job does for a Sales order with line items >8 then the error comes and job fails.
Kindly suggest me as to where i need to look for the error.
Regards,
SuryaD.Thanks for your response Dave.
Yes i am doing a BDC Call Transaction.
there is no BAPI.
Trickier part is when i execute the job through debugging then i do not get the error.
What could be the reason for this error.
Is it some error in teh coding?
regards,
SuryaD. -
Why the form6i program disappear,when the program run
help
I'm not sure what the context of your question is but sometimes I have a similar problem where when I run my forms object it appears for a second and shuts down. I get around this by carrying out a full compile and then the forms object behaves correctly.
cheers
Gnana -
Start background Job when another is finished (NOT with the JobSteps)
Hi guys,
i need your help.
I've already searched here in forum, but i wasn't able to find a good solution.
I have this problem.
I have a program that create a background job with the FM FM JOB_OPEN.. SUBMIT report with parameters .. JOB_CLOSE.
I want that if i run this report again (20 secs after for example) it does:
- Check if there is an already running Job with the same name (means with state 'R') (This task is simply, with a select on TBTO table)
- If it's found, it have to create a new job with the same name that starts automatically AFTER the first running job is finished (don't care about the end-state of the first job).
I've already tried with pred_jobcount & PRED_JOBNAME parameters of the JOB_CLOSE FM but it doesen't works!
The JOB_CLOSE, creates a job in Planned state. But when the first Job is finished, the second job(Planned) doesen't start automatically.
In this scenario, i CANNOT use endless loops (wait until the first job is finished and then submit the second) Job-steps (one job that contains multiple steps) events (i have to start only one job after the predecessor is finished), because this report could be run many times and each job should be collected like a "stack" (only when the first job is finshed the second "registered" should be started and so on, until the aren't more planned jobs).
<REMOVED BY MODERATOR>
Thx a lot for your help.
Andrea
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:19 PMHi Veda
i can tell u but ... some reward points are very appreciated ....
I'm joking (of course)
Here the question:
I have a program (called A) that submit a new program (called B) with the JOB_OPEN .. submit JOB_CLOSE. The program B should start only if another program B (called before for example) is finished.
Here the solution.
I add a parameter (with no-display clausole) to the program B. In this parameter i pass to the program, the job number returned by the JOB_OPEN function.
When i create the JOB with the function, the "jobname" parameter is set with value 'G_DELIVERY' (Here u can change the name of the job as u want : this is the jobname that u see in SM37 transaction).
In the start-of-selection of program B i put a "waiting" procedure like this :
First i save a timestamp of system-date and system-time (called for example r_date and r_time)
select from table TBTCO all the jobs called "G_DELIVERY" with jobnumber <> from the jobnumber parameter (that means exclude itselfs) with status running ('R') -> that have startdate /starttime less than the r_date and r_time <- (this is the key of the selection that solve the problem).
if it is found (means there is another running job started before this one).
wait up to 60 seconds. "for example
repeat the selection.
endif.
When the job called before ends, this one programs exits from the loop and continues. If u submit more programs "B", they'll works like a stack.
I should say to u just one thing.... I solved my problem in another way (because i've changed the logic so this problem was no more) so i didn't implemented that logic, but it should works very good.
Try it and tell me!
Bye
Andrea
Maybe you are looking for
-
Troublesho​oting with Verizon Blackberry
I am sorry if this is in the wrong section. I just got a blackberry that is for verizon from a friend. it does NOT have a sim card. im not sure what kind of blackberry it is yet, because i havent gotten it yet. i currently have verizon and have a reg
-
How can I properly embed deep links that contain http: twice
Hi, We have an online bookstore where we need to embed deep links to a booktopia page. I have tested the links given to us by the affiliate program (DGM performace) and they work perfectly but when I embed them into muse and hit publish they give me
-
How do I get imessages from two different numbers
I am able to get my son's imessages from other iphones show up on my iphone. How can I add my daughter's number that is on my account as well?
-
NWDI for Mobile 7.1 PDA App
Hello, I want to create a service and ui component for the PDA and want to use the NWDI. I know that I had to create a product and software component in the SLD, but what are the "Prerequisite Software Component Versions" for this? What are the confi
-
Hello experts, I am currently modifying a report where in I need to change some statements because it gets a PO's balance in table BSAK-wrbtr and instead I need to change it to EKBE-wrbtr. The problem is I don't know if there's a common field where I