Execute an OS/400-command (CL-programm) by an ABAP (Z-transaction)

Hello all!
we are searching for possibility to execute an OS/400-command (CL-programm) by an ABAP-programm (Z-transaction).
Actual (not working) example:
REPORT Z_WRKOUTQ_STOP.
Data: p_command(250) value 'KMXHOM6/QSYS.LIB/SKOLIB6.LIB/SKC001.PGM'.
DATA: BEGIN OF tabl OCCURS 10,
filler(1000),
END OF tabl.
CALL 'SYSTEM' ID 'COMMAND' FIELD p_command
ID 'TAB' FIELD tabl-sys.
Thanks for an answer.
Regards,
Bernd

Hi,
post your query in ABAP Forum.
you can do this using  Function Module SXPG_COMMAND_EXECUTE
This function allows a programmer to run a command from within an ABAP program.
regards,
kaushal

Similar Messages

  • BUG report: Distiller v.8.1.0 erroneously execute i/o-operations in PostScript programms

    Distiller v.8.1.0 erroneously execute i/o-operations in PostScript programms (WinXP SP3 & Win2K3 RC1 SP2 platform).
    Execution of the PS-code, contained file i/o operaions (see
    i PLRM 3rd edition
    , pp.73-87)
    c %*************************** PS-File *********************************
    c (c:\\temp\\File1.txt) (w) file closefile % Open file for write and close it
    c %*********************************************************************
    (or others file write ops.) produce invalidfileaccess error:
    b =============== Distiller LOG =====================
    > %%[ Error: invalidfileaccess; OffendingCommand: file ]%%
    > Stack:
    > (w)
    > (c:\\temp\\file1.txt)
    > %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    > %%[ Warning: PostScript error. No PDF file produced. ] %%
    b ==================================================
    Execution of the file read operations (file exist!)
    c %*************************** PS-File *********************************
    c (c:\\temp\\File2.txt) (r) file closefile % Open existing file for reading
    c %*********************************************************************
    or
    c %*************************** PS-File *********************************
    c (c:\\temp\\File2.ps) run % execute existing PS-program
    c %*********************************************************************
    produce undefinedfilename error:
    b =============== Distiller LOG =====================
    > %%[ Error: undefinedfilename; OffendingCommand: file ]%%
    > Stack:
    > (r)
    > (c:\\temp\\file2.txt)
    >
    >
    > %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    > %%[ Warning: PostScript error. No PDF file produced. ] %%
    b ==================================================
    b =============== Distiller LOG =====================
    > %%[ Error: undefinedfilename; OffendingCommand: run ]%%
    > Stack:
    > (r)
    > (c:\\temp\\file2.ps)
    > %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    > %%[ Warning: PostScript error. No PDF file produced. ] %%
    b ==================================================
    It doesn't matter, in what folder operation is carried out system %TEMP% or User %TEMP% (not in %HOMEPATCH%!) file i/o
    b don't work.
    With mentioned [in KB http://www.adobe.com/devnet/acrobat/downloads/Acrobat_SDK_readme.html ] command line switch «-F» all works correctly.
    This "feature" of the Acro8 (and Acro9? see http://www.adobeforums.com/webx/.59b69fa1 ) does impossible execution of the PostScript programs of variable data print.
    What to do that Distiller the beginnings it is correct to work (file i/o into %TEMP%-folders) without «F»-switch?

    I don't use Acrobat SDK, i make PostScript-programs for the var.data print, f.e. labels with wire name, numbers, barcode etc.; Distiller plays role RIP, carrying out the program.
    As a data source at execution of these programs files of various formats can be used: ANSI/UNICODE text, binary (f.e. PhotoShop-RAW data), PostScript (f.e. «print-in-file» from Illustrator) file and others. The same programs can write what or given on a disk (tmp-files), for example the pointer to the data in a source file or the debug information.
    For me has surprised that in 8 Acrobat'е all it has suddenly ceased to work, though in early versions and ghostScript all is fulfilled correctly. I have assumed that obviously developers had been limited possibility of data write/reading a disk and, most likely by a TEMP-folder. However even in the TEMP-folders setted by means of a variable %TEMP% of write operation at execute of PostScript-program by Distiller it was not possible to make. Also attempt to read/execute a file which is in a TEMP-folder was unsuccessfully completed also.
    During search in the Internet I have found article specified above ( http://www.adobe.com/devnet/acrobat/downloads/Acrobat_SDK_readme.html ) in which it is underlined possibility by default operations of file I/O in a TEMP-folder, however impossibility it to make contrary specified in this article, have forced me to write to this forum so it is read by Acrobat developers.

  • Error to execute the script through command prompt

    I tried to execute the script through command prompt. I got some following error. Could you please advice me how to rectify this.
    cscript D:\JS\Test.js
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
    D:\JS\Test.js(1, 1) Microsoft JScript runtime error: 'app' is undefined.
    Thanks,
    Prabudass

    I haven't use CS for quite some time and file associations may not work with the command prompt.
    You can try using Windows Explorer to browse to a .js file then right click on that file. From the popup menu choose Open With. Even if you see Photoshop in the file list choose Browse at the bottom. Browse to Photoshop and make sure to check 'Always use selected program...'
    If that doesn't work you will need to create an action that runs your script and make a droplet from that action. You can then use the droplet in the command prompt. You may also need to create a 'dummy' image file to launch the droplet with if you script doesn't require an open document at startup. See http://www.ps-scripts.com/bb/viewtopic.php?t=967

  • Executing a Operating System command from Stored Procedure ??

    I want to execute a Operating System command from a PL/SQL Stored Procedure, can anyone suggest me how can I do this ??
    I am on Sun-Solaris with Oracle 8.1.7 database.
    Please do email me at [email protected]
    Thanks in Advance,
    Ramesh L.

    Are you using a webserver? If so, you could make your operating system script into a CGI program, then execute it from pl/sql using utl_http.request.

  • How to execute a "real" VBS command in DIAdem script?

    Hello,
    I've some troubles to execute specific "real" VBS command lines in DIAdem script: 
    e.g.: 
    Workbooks.OpenText filname, DataType:=xlDelimited, tab:=True, DecimalSeparator:=",", ThousandsSeparator:="."  
    Using other writings as
    Workbooks.OpenText(filname, DataType:=xlDelimited, tab:=True, DecimalSeparator:=",", ThousandsSeparator:=".")Workbooks.OpenText filname, "DataType:=xlDelimited", "tab:=True", "DecimalSeparator:=','", "ThousandsSeparator:='.'"  
    don't help, I always get error messages. It seams, that DIAdem has problems with recognition of  := .
    How can I include such kind of VBS command line in a DIAdem script without getting problems?
    Sven

    Hi,
    thanks for answer, but unfortunately its not over yet.
    I tryed the following possibilities:
    Set create_tabfile = Excel.Workbooks.OpenText(Filename,,,xlDelimited,,,True,,,,,,,,".",",",,True)Set create_tabfile = Excel.Workbooks.OpenText(Filename,,,xlDelimited,,,1,,,,,,,,".",",",,1) Set create_tabfile = Excel.Workbooks.OpenText(Filename,,,"xlDelimited",,,True,,,,,,,,".",",",,True)  Set create_tabfile = Excel.Workbooks.OpenText(Filename,,,"xlDelimited",,,1,,,,,,,,".",",",,1)  Set create_tabfile = Excel.Workbooks.OpenText(Filename,,,1,,,True,,,,,,,,".",",",,True)Set create_tabfile = Excel.Workbooks.OpenText(Filename,,,1,,,1,,,,,,,,".",",",,1)but always I get some error messages. I assume, that there is just a format error in the command line, may you help me out with some hints, how to do it right?
    Regards
    Sven

  • How to execute IDC services from command line

    Hey Guys,
    is there some way we can execute IDC Services from command prompt.
    your any pointers will be highly appriciated.
    regards,
    sapan
    Edited by: sapan on Mar 9, 2009 7:26 AM

    Hey sapan,
    You can use IdcCommand to execute services from the command line. The process is as follows:
    1. Create a text file with the services calls you want to make, the definitions are in hda format:
    @Properties LocalData
    IdcService=UPDATE_DOCINFO
    dID=1
    dDocName=000001
    dDocType=MyType
    dSecurityGroup=Public
    dRevLabel=1
    dDocAuthor=sysadmin
    dDocTitle=My Title
    @end
    <<EOD>>
    (Note: for multiple entries in the file <<EOD>> is very important)
    2. Execute IdcCommand from the <content server install>/bin directory:
    IdcCommand -f image_update.hda -u sysadmin -l c:\idccommand.log
    Options:
    -f = file with service definitions
    -u = user to run as
    -l (lowercase L) = location for log of execution
    More detailed documentation can be found in the Idc Command Reference (idc_command_reference_10en.pdf).
    Hope that helps,
    Andy Weaver - Software Consultant
    Fishbowl Solutions < http://www.fishbowlsolutions.com?WT.mc_id=L_Oracle_Consulting_amw >

  • Solaris server hung when executes prstat or ps command

    Hi all,
    When we are executing prstat or pr command, the global zone and non global zone images are hungs.
    kindly give some suggesstions to resolve

    I've noticed huge latency while running prstat, ps type commands on certain systems running java-based applications.
    This could be due to lock mgmt issues:
    [http://prstat.blogspot.com/2008/03/stuck-ps1-thanks-mdb1.html|http://prstat.blogspot.com/2008/03/stuck-ps1-thanks-mdb1.html]
    I would recommend you open a case with sun to find out more.

  • Validation Error - An error occured executing the provided SQL Command

    Hi All,
    I am new to using SQL Server in general (2008 R2) and am trying to change the source location for multiple packages in order to obtain our data from a more reliable environment.
    I have created a copy of the target database where the data will be loaded, amended the source and target connection managers and ran through the packages to ensure they work, which many do.
    We are changing the source from a local server to a cloud based server and when running a package that literally truncates target table, selects * from source, and inserts data to target I get a validation error "An error occurred executing the provided
    SQL Command "Select *...." The connection has been disabled" and "component ADO NET Source failed validation and returned validation status "VS_ISBROKEN"".
    The table structure from the 2 sources is the same and I have even recreated the data flow tasks to ensure the metadata has updated. When selecting 100 rows or even 5,000,000 rows from source the package runs fine but will fail as above
    when selecting &* (around 9.5 million rows).
    I'm not sure if this is due to the new data source being web based or if it could be some erroneous data in the table that isn't being selected when limiting to 5 milling rows etc.
    I have spend hours trying to figure out what the issue could be (doesn't help being new to SQL Server) so any guidance would be hugely appreciated!!!
    Thanks,
    Louis.

    Hi All,
    Unfortunately I don't believe any of the above are the issues.
    Our current working project/packages run via an SQL agent job daily. To test and ensure the package in question ran outside of the agent WITHOUT changing the ADO NET Source I exported the package (that runs daily) and ran it locally,
    to which it failed.
    I then edited the select statement from 'select * from [table]' to 'select top(100) from [table] to which it ran without error.
    So in summary:
    Package will run fine if run as part of the agent job (with multiple other packages)
    Package will not run from File System when selecting * from the source table
    Package will run from File System when selecting limited rows
    Could this be something to do with permissions? The errors I get are:
    An error occurred executing the provided SQL command: "select * from [table]". The connection has been disabled.
    "component" ADO NET Source"(396") failed validation and returned validation status "VS_ISBROKEN".
    Thanks,
    Louis.

  • Executing Preview from a command line

    Colleagues,
    I have multi-page PDF documents (created with R [R-project.org]) from which I convert a single page to TIFF. Is there some means to execute this from a command line? Presumably, I would need arguments for (at least) input file name, output format, and pages.
    Any help would be appreciated.
    Dennis

    I've used it extract pict bitmaps from pdf screen shots in 10.3.9:
    <pre style="border: 1px solid #ddd; padding-left: .75ex; padding-top: .25em; padding-bottom: .25em; margin-top: .5em; margin-bottom: .5em; margin-left: 1ex; max-width: 60ex; overflow: auto; font-size: 10px; font-family: Monaco, 'Courier New', Courier, monospace; color: #444; background: #eee; line-height: normal">sips -s format pict picture.pdf -o picture.pct</pre>
    But in my case I think the pict is embedded in the pdf.
    Cole

  • Executing jar file on command line [windows]

    Hi,
    I am trying to run .jar file "senthil.jar" . It catures systems screenshot.
    http://sensaran.wordpress.com/2010/06/04/screen-shot-utility-using-air-2-0/
    I am using it in AIR application. I want to execute this file from  command line. I am not sure how to pass command line arguments.
    Currently i am trying to do it like :  java -jar senthil.jar
    I need to provide a parameter as "Print Screen"
    Its corresponding Flex Code is :
                var arg:Vector.<String> = new Vector.<String>;
                arg.push("-jar");
                arg.push(File.applicationDirectory.resolvePath("senthil.jar").nativePath);
                 var file:File = new File();
                file = file.resolvePath(javaPath.replace(/\//g, File.separator));
                var npInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
                npInfo.executable = file;
                npInfo.arguments = arg;
                nativeProcess = new NativeProcess();
                nativeProcess.start(npInfo);
                nativeProcess.standardInput.writeMultiByte("Print Screen" + "\n", "utf-8");
    Thanks

    Did you give the -jar option with javaw? And the "%1"? See the file associations of some other extensions for example of how to do this
    For example on my machine,
    W:\>assoc .mp3
    .mp3=Winamp.File
    W:\>ftype Winamp.File
    Winamp.File="C:\Program Files\Winamp\Winamp.exe" "%1"Now I can
    start song.mp3Or doubleclick on mp3 file in explorer to open it in winamp.

  • Not able to execute J1IFR T-code as it is going to ABAP Dump.

    Hello everybody,
    When we execute the command J1IFR, it generate the ABAP dump for challan with
    -ve Qty (Quantity of goods received).
    The details as follows
    Runtime Errors         DYNPRO_FIELD_CONVERSION
    ShrtText                                                                               
    A conversion error occurred.                                                                 
    Error analysis                                                                               
    The program flow was interrupted and could not be resumed.                                 
       Program "SAPMJ1IFN" tried to display fields on screen 1210. However, an                      
       error occurred while this data was being converted.                                                                               
    So please suggest How to solve the error?
    Thanks
    Ganesh

    This is happened due to
    -ve Qty (Quantity of goods received)

  • Maintaining COMMAND in AIX / UNIX Operating system using Transaction SM69

    Hi,
    <b>I need to maintian command in AIX operating system by using transaction SM69.</b>
    Previously we were maintaining COMMAND in Windows NT Operating system using transaction SM69.
    There in SM69 we were using Operating System: Windows NT & OS command: cmd /k
    <b>But now we have to maintain in AIX Operating system.
    could any body tell for operating system: AIX, what "Operating system command" should i give..</b>
    If also I could get any link, that will be more helpful to me.
    Any help will be appreciated and rewarded.

    Hi Sameer,
    1. In case of AIX operating system,
        there is no need to give any such thing like CMD.
      In windows,
      (eg for DIR, we have to give CMD /C DIR)
    2. <b>But in AIX/UNIX, We directly need to give the final command.</b>
       eg: command is ls
       and in parameters we can give -la?
      (note, in aix/unix, command is case sensitive)
    regards,
    amit m.

  • How to execute a unix/dos command in Java

    Hi,
    I want to execute dos/unix commands in my java program. Can anyone tell me how to do this. Say I want to restart my httpd daemon using the command: "service httpd restart" or test my httpd.conf file using the command "testparn"
    thanks in advance
    Hugo Hendriks

    hallo,
    test this:
    Process p = Runtime.getRuntime().exec(Your_Programm);
    p.waitFor();
    LineNumberReader lnr = new LineNumberReader(new InputStreamReader(p.getInputStream()));
    Your_Programm must be a shellscript. regard that your java programm must have the right to start the httpd!
    Carsten Bluetner

  • Execute immediate on DDL command

    Below sample SQL is 1 of the many code that is running OK in our database. And this code has causes a lot of latch contention to our database and it's being called so many times that cause hard parse.
    /* test code */
    CREATE OR REPLACE PROCEDURE dsal (p_client_id NUMBER) IS
    BEGIN
    EXECUTE IMMEDIATE
    'create table tmp_dsal_'||p_client_id
    ' (client_id number, '||
    ' trade_id number, '||
    ' ps_id number, '||
    ' ps_liquid varchar2(2), '||
    ' status_code varchar2(3) default ''NA'' not null, '||
    ' start_value_dte date, '||
    ' end_value_dte date)';
    EXECUTE IMMEDIATE 'drop table tmp_dsal_'||p_client_id;
    END;
    I want to improve it by using bind variable. The below program compile with no error.
    CREATE OR REPLACE PROCEDURE dsal (p_client_id NUMBER) IS
    BEGIN
    EXECUTE IMMEDIATE
    'create table tmp_dsal_:client_id'||
    ' (client_id number, '||
    ' trade_id number, '||
    ' ps_id number, '||
    ' ps_liquid varchar2(2), '||
    ' status_code varchar2(3) default ''NA'' not null, '||
    ' start_value_dte date, '||
    ' end_value_dte date)' using p_client_id;
    EXECUTE IMMEDIATE 'drop table tmp_dsal_:client_id' using p_client_id;
    END;
    When I execute it, I'm getting the below error. I understand DML statement using bind variable in execute immediate command but not sure on DDL. Is there a workaround on issue or this is limitation?
    SQL> exec dsal(223);
    BEGIN dsal(223); END;
    ERROR at line 1:
    ORA-00922: missing or invalid option
    ORA-06512: at "SYS.DSAL", line 3
    ORA-06512: at line 1
    Appreciate any comment/help. Thanks

    Assuming that all of the client load processes run in seperate session, then do this once in the database and use this global temporary table for the loads. A GTT is a permanent object in the database, but the data it contains is only visible to the session that inserts it. Multiple sessions can access the same GTT at the same time, and will never see each other's data.
    CREATE TEMPORARY TABLE tmp_dsal (
       client_id       NUMBER,
       trade_id        NUMBER,
       ps_id           NUMBER,
       ps_liquid       VARCHAR2(2),
       status_code     VARCHAR2(3) DEFAULT 'NA' NOT NULL,
       start_value_dte DATE,
       end_value_dte   DATE)
    ON COMMIT [PRESERVE|DELETE] ROWSThe on commit clause determines what happens to the data in the GTT when the session that created the data issues a commit. DELETE will automaticall delete all of that session's data while PRESERVE will keep the data until the session either explicitly deletes it or the session ends.
    John

  • Error while executing the AVORCLDB SETUP command

    Hi
    We have installed Oracle Audit Vault Server on Linux x86 Operating system and we want to collect Audit data from a DB installed on Windows XP x32 with Oracle Standard Edition 10.2.0.3. We have successfully configured the DBAUD and the OSAUD collectors but when we try to run the avorcldb setup -srcname <source name> command, from the source DB we are receiving the following error:
    avorcldb setup -srcname
    Enter Source user name: srcuser_ora
    Enter Source password:
    ERROR: could not get AV agent connection using jdbc:oracle:oci:@AV
    ERROR: java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified
    Could you please help us with this issue because without executing this command successfully we can not start our collectors while the agent is starting successfully.
    Thanks in advance
    Best regards
    engrid

    Hi,
    Our version of Oracle Audit Vault both Server and Agent are 10.2.3.
    The reason that we have entered the Setup statement like that is because that is how it is shown on the Administrative guide for AV 10.2.3. When we executed this statement for the first time it worked fine and the Audit data were being collected from the DB, but now when we are trying to execute it again we receive this.
    We are trying to execute it again because the Agent can start successfully while none of the collectors can start successfully.
    The error maybe shows that there is some problem with the connection of the DB and the AV Server, but when we test the Services Connection from Oracle NetManager they are all successfully connecting.
    Hope this info will be more helpful.
    Best Regards
    Engrid

Maybe you are looking for

  • Can't find printer

    I have a Canon Pixma MP 610. I was having trouble printing so in Print and Fax, I deleted the printer. I reinstalled the printer driver, but now when I go to Print and Fax, hit the + key, the printer does not show up. I've rebooted, unhooked cables,

  • HT1119 MacBook Pro late 2011 won't turn on

    I was working late and let my battery drain while working. The computer shut down. I immediately plugged it in but the light on the power adapter didn't turn on (either orange or green) I tried other plugging it into other outlets. Nothing. I left it

  • Solaris 10 x86 64-bit wireless connection problem

    I installed Solaris 10 x86 32-bit on my laptop together with Fedora 10 (Linux) and Windows XP. When I boot up Fedora 10 and WinXP, these two OS are able to find the wireless driver automatically, but Solaris 10 failed. When I do prtconf -pv, I saw my

  • HT4528 How do i get my security answers?

    HOw do i recover my security question answers?

  • Stopped Initial download for Bupa_Main  in CRM in between

    Hi Experts, We have a problem in CRM. The initial download for the object BUPA_MAIN was accidently started by one of collegues. The job ran for almost 24 hour adn was still running. The queues went as high as to 40000 entries & the outbound queues st