Sqr to run an ftp script

Hello all,
I an running an SQR under PeopleSoft
PIA (Web) that is using call system to ftp a file from NT to the FTP site.
The code works fine if I run it through SQRW, but when running it through a
PeopleSoft page, nothing happens. I don't believe I am getting a valid status
code either, as it is always 0, though from what I read in the SQR manuals,
for NT, anything less than 32 is an error.
any help would be appreciated

Jason,
I would pipe the output of the FTP command to a log file. That way you at least have something to review in the case of problems. We use SQR to perform all of our file transfers to a wide variety of servers. This method has proven quite reliable for us.
In addition, we wrote some code to spin through the log file and look for precise reasons for failure (invalid password, simply not connected, etc.).

Similar Messages

  • Powershell- FTP Script to copy files only after a certain time

    Hey guys,
    We are currently running an FTP script that decrypts pgp and copies/moves several files to different archived and production locations. These files come in constantly throughout the day and we need to ensure a certain 8 files get moved to 4 different locations
    but NOT before a certain time.
    Ex: File1 and File2 are received EARLY along with 50 other files and decrypted at 9pm EST on 9/4. File1 and file2 need to WAIT to be moved until after 12:05am EST on 9/5 or it is slapped with an incorrect $date/time and not processed correctly but
    every other file needs to be moved (which is currently all configured).
    Right now, both file1 and file2 are being moved as the script runs  (every 10 minutes) so when the files come in early from the vendor- they get the incorrect date/time stamp.
    I'm fairly new to powershell so I'm not quite sure how to set this up to only move the file if it is between a certain time- say 12am-1am and no other time.

    I was able to resolve this myself by doing the following:
    $hourdate = get-time –uformat “%H” 
    #Copy-Item as long as time is in the 12:00am or 1am hour 
    if(($hourDate -eq "0")-or ($hourdate -eq "1")) 
    copy-item objects
    Thanks guys

  • FTP script

    Hello,
    Does anyone know if there is a way to use FTP script from a
    coldfusion or html page? I need to run a QUOTE command. I am using
    version - Coldfusion MX7.
    Thanks, Tim

    Hi Tim -
    does this help?
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_f_16.html
    timrande wrote:
    > Hello,
    > Does anyone know if there is a way to use FTP script
    from a coldfusion or html page? I need to run a QUOTE command. I am
    using version - Coldfusion MX7.
    >
    > Thanks, Tim
    Michael Evangelista, Evangelista Design
    Web : www.mredesign.com
    Forums: news://forums.mredesign.com
    Blog : www.miuaiga.com

  • Running a SFTP script as a scheduled task

    Would like to run a SFTP script I wrote which is shown below as a scheduled task.  It runs fine when I don't use the task scheduler.  Technically it runs when I do use the task scheduler I just don't wind up with any .csv files.  It is
    currently written in vbscript and i'm not sure if it's worth it to convert it to powershell.  Do you have advice on what I can do differently to make it work as a scheduled task?  To attempt to resolve the problem I tried to run it
    from a BATCH file which did not help.
    set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.run("C:\xyz\PSFTP.EXE")
    WshShell.AppActivate "C:\xyz\PSFTP.EXE"
    WScript.Sleep 1000
    WshShell.SendKeys"open secureftp.server.com"
    WshShell.SendKeys("{Enter}")
    WScript.Sleep 1000
    WshShell.SendKeys"Username"
    WshShell.SendKeys("{Enter}")
    WScript.Sleep 1000
    WshShell.SendKeys"Password"
    WshShell.SendKeys("{Enter}")
    WScript.Sleep 1000
    WshShell.SendKeys"cd Folder1"
    WshShell.SendKeys("{Enter}")
    WScript.Sleep 1000
    WshShell.SendKeys"mget *.*"
    WshShell.SendKeys("{Enter}")
    WScript.Sleep 4000
    WshShell.SendKeys("bye")
    WshShell.SendKeys("{Enter}")
    The file shown below is how I wrote the batch file.  The first line clears out all previous .csv files and I delay a second and kick off the vbscript.
    Del /Q "C:\xyz\*.csv"
    ping 192.0.2.2 -n 1 -w 1000 > nul
    wscript "C:\xyz\ftp.vbs"

    Thanks Bill I appreciate that.
    The first thing I needed to do was add the start in path to the scheduled task
    Then the script needed converted to powershell since sendkeys is no longer supported.  I found a good example on the net and used it.
    $username = "Username"
    $password = "Password"
    $server = "secureftp.server.com"
    $exepath="C:\xyz\PSFTP.EXE"
    $cmd = @(
    "cd ..",
    "cd folder1",
    "mget *.*",
    "bye")
    $cmd | & $exepath -pw $password "$username@$server"

  • Creating a job that runs a Tcl script

    Hi,
    We currently have a scheduled job running a Tcl script on a 8.1.7 DB. My question is, can I still use the same setup in 10g DB (i.e. creating a job that runs Tcl script)? If I can, how am I gonna do it?
    Thanks,
    howie

    It depends on how you scheduled the job in 8.1.7 DB.
    By Cronjob? Yes you can do the same to connect to 10g
    By DBMS_JOB?. Yes you can do it in 10g and in addition, can improve it with DBMS_SCHEDULER
    Via OEM? Yes in can use Enterprise Manager to create a Job that runs the Script.

  • How can I run a SQL script file...

    How can I run a SQL script file from a location on my computer without providing the whole path?
    Is there some way I can set a "Working folder" in SQL Plus??
    Thanks!
    Tom

    You can create an environment variable called "SQLPATH" which is a list of directories that SQL*Plus will search for your .SQL
    scripts.
    I would like to use another directory than the oracle/bin...
    How can I do this ??
    Hello,
    U can do this by this way:
    Save odm_script.sql file to the default Oracle
    directory i.e. Oracle-Home/bin and Run following command
    through SQL Plus.
    SQL>@Script_Name
    I hope this will resolve ur problem.
    Regards,
    Omer Saeed Khan.

  • How to run a sql script in oracle forms

    Hi,
    For me there is an sql script. I need to run that sql script in forms.
    Actually we will run that sql file in pl/sql developer by giving @and the file name.
    But how to run that file in forms.
    Can any one help on these.Which book I have to look.
    Thanks

    Actually there is a script files which will drop all the indexes and tables.
    DROP querry will be there for each index and each table.
    So I run the script all the indexes and all the tables will be deleted. So using forms I have to run that script.
    Thanks

  • Error while running irca.sh script.

    hi all;
    I try to install SOA suite10.1.3.1 on linux. as a pre-requirement, I should create ORABPEL, ORAWSM and ORAESB schemas in our production database, but I get following error when I run irca.sh script:
    manyas@ /oracle/IMDB/102_RAC #./irca.sh
    Integration Repository Creation Assistant (IRCA) 10.1.3.1.0
    (c) Copyright 2006 Oracle Corporation. All rights reserved.
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/tip/install/tasks/IRCA
    does anyone have any idea?
    thank you.

    path to java and classes should be to java and SOA suite first. then database...
    looks like you are picking up a DB classpath first.

  • I am trying to update my iTunes to 10.5.1 so that I can upgrade my 3GS phone but am getting the following error message when trying to install the itunes:Install step failed: Run pre upgrade script for apple mobile device support. Contact software manufac

    I am trying to update my iTunes to 10.5.1 so that I can upgrade my 3GS phone but am getting the following error message when trying to install the itunes: Install step failed: Run pre upgrade script for apple mobile device support. Contact software manufacturer for assistance. I am on a MacBook pro running 10.5.8 OS. Has anyone seen this before and how can I get it resolved.
    Thanks for your help in advance....

    Did you ever figure out the problem? "Contact Software Manufacturer"?? That sounds ominous... I've got the same issue and I'm pretty durn aggravated right about now....
    Thanks!

  • How to solve that error in primavera p6 version 8.4 installation???????upgarding Data Base((missing permissions: DBMS_REPUTIL. Run the manual script first -- manual_script_before_upgrade.sql)

    please advice how to solve that problem (in steps):
    after completing p6 installation and during upgrading the old Data Base from p6 v8.3 to P6 v8.4 I'm facing that error
    ((missing permissions: DBMS_REPUTIL. Run the manual script first --> manual_script_before_upgrade.sql)

    for more help this image is much helpful
    1. Open cmd prompt >> Type sqlplus / as sysdba; >> connect sys/oracle@XE as sysdba;
    2. Type @ <path>\manual_script_before_install.sql
    thanks for      Pablo Oyarzo - Oracle    for his help as the above answer related to him

  • Opening a document in photoshop and running a ps script

    I'm trying to write a script which will open a link in photoshop (which I have managed to do with Link.editOriginal) and also run a photoshop script after the file is opened. I have looked in online references and the PDF's found on this site, but I can't seem to find a function which will let me run a ps script from inside Indesign. Is there any method of doing this, or am I out of luck?
    Thanks for your time.

    Gerald Singelman told me to check the status of a link in a loop before executing the update()-command.
    This is the updated version:
    // resizeInPS04.jsx 
    //DESCRIPTION: Resizes every link in PhotoShop 
    var theScale = 150; // scaling factor in % 
    var theResolution = 72; 
    var theResampleMethod =  'ResampleMethod.BICUBIC'; 
    var myChoice = confirm ('Warnung! \rBei Ausfühurng dieses Skriptes werden unwiderruflich alle verknüpften Bild-Dateien verändert. Machen Sie vorher Backups der Dateien.' ); 
    if (myChoice == false) 
      exit(); 
    var myLinks = app.activeDocument.links; 
    for ( var i = myLinks.length-1; i >= 0; i-- ) 
    ResizeInPS( myLinks[i].filePath, theScale, theScale, theResolution, theResampleMethod ); 
    while (myLinks[0].status == LinkStatus.NORMAL )
    // think about the weather
    myLinks.everyItem().update(); 
    for ( var x = myLinks.length-1; x >= 0; x-- ) 
    myLinks[x].parent.fit( FitOptions.FRAME_TO_CONTENT ); 
    function ResizeInPS(myPath, myHorScale, myVerScale, myResolution, myResampleMethod) {  
       var bt = new BridgeTalk;  
       bt.target = "photoshop";  
       var myScript = 'try {\n';  
       myScript += 'var myPsDoc = app.open(File(\"' + myPath + '\"));\n';  
       myScript += 'app.preferences.rulerUnits = Units.PERCENT; \n' ;  
       myScript += 'myPsDoc.resizeImage(' + myHorScale +', ' + myVerScale + ', ' + myResolution + ', ' + myResampleMethod + '); \n' ;  
       myScript += 'myPsDoc.close(SaveOptions.SAVECHANGES);\n';  
       myScript += '}\n';  
       myScript += 'catch (myError) {\n';  
       myScript += 'myPsError += \"myError' + myPath + '\";\n';  
       myScript += '}';  
       bt.body = myScript;  
       bt.send();  
    Martin

  • How I run a shell script from the scheduler on 10.2.0.2.0 ?

    Hello Oracle People,
    I'd like to run a shell script from the Scheduler in my 10g database.
    Right now it is a simple shell script.
    Eventually it will wrap RMAN commands to back up my DB.
    I wrote a simple pl/sql script to create a job:
    -- cr_job10.sql
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'my_backup_job',
    job_type => 'EXECUTABLE',
    job_action => '/h/oracle/scripts/tst.sh',
    start_date => '06-SEP-07 5.33.00PM US/Pacific',
    repeat_interval => 'FREQ=DAILY',
    end_date => '08-SEP-07 4.00.00PM US/Pacific',
    enabled => TRUE,
    comments => 'My Backup Job');
    END;
    I see no errors when I run the above procedure.
    I checked DBA_SCHEDULER_JOBS and the job is in there.
    The scheduler, though, errors out with an error which I see in a trace file:
    /h/oracle/admin/orcl/bdump/orcl_j000_22396.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ORACLE_HOME = /h/oracle/product/10r2
    System name: SunOS
    Node name: sol
    Release: 5.10
    Version: Generic_118855-14
    Machine: i86pc
    Instance name: orcl
    Redo thread mounted by this instance: 1
    Oracle process number: 15
    Unix process pid: 22396, image: oracle@sol (J000)
    *** ACTION NAME:(MY_BACKUP_JOB) 2007-09-06 17:33:00.175
    *** MODULE NAME:(DBMS_SCHEDULER) 2007-09-06 17:33:00.175
    *** SERVICE NAME:(SYS$USERS) 2007-09-06 17:33:00.175
    *** CLIENT ID:() 2007-09-06 17:33:00.175
    *** SESSION ID:(140.13520) 2007-09-06 17:33:00.175
    *** 2007-09-06 17:33:00.175
    ORA-12012: error on auto execute of job 53267
    ORA-27369: job of type EXECUTABLE failed with exit code: 274662
    I googled on this:
    ORA-27369: job of type EXECUTABLE failed with exit code: 274662
    Google returned only 1 hit.
    There, I see some evidence that I need to configure something inside
    of Oracle to run shell scripts from the scheduler, but possibly just
    for machines running windows. I'm running Solaris.
    Do any of you know what I need to configure inside of Oracle to
    run shell scripts from the scheduler?
    -Owen

    Hello people,
    I should have added this bit of information:
    "The script runs fine from oracle's crontab."
    "The script runs fine from a shell owned by oracle."
    I'm getting responses telling me to check my env variables and permissions
    which would be helpful to a UNIX novice.
    I have a feeling that no one is using the scheduler to run RMAN scripts.
    Tim Hall suggested I take a close look at these files:
    $ORACLE_HOME/rdbms/admin/externaljob.ora
    $ORACLE_HOME/bin/extJob
    Currently I'm setup like this:
    bash sol root /h/oracle/product/10r2/bin 31 #
    bash sol root /h/oracle/product/10r2/bin 31 # ll $ORACLE_HOME/rdbms/admin/externaljob.ora
    -rw-r--r-- 1 root dba 52 Sep 7 15:29 /h/oracle/product/10r2/rdbms/admin/externaljob.ora
    bash sol root /h/oracle/product/10r2/bin 32 #
    bash sol root /h/oracle/product/10r2/bin 32 # cat $ORACLE_HOME/rdbms/admin/externaljob.ora
    # externaljob.ora
    run_user = rman
    run_group = rman
    bash sol root /h/oracle/product/10r2/bin 33 #
    bash sol root /h/oracle/product/10r2/bin 33 #
    bash sol root /h/oracle/product/10r2/bin 33 #
    bash sol root /h/oracle/product/10r2/bin 33 # ll $ORACLE_HOME/bin/ext*
    -rwsr-x--- 1 rman dba 30388 Sep 21 2006 /h/oracle/product/10r2/bin/extjob*
    -rwsr-x--- 1 rman dba 30392 Sep 21 2006 /h/oracle/product/10r2/bin/extjobo*
    -rwsr-x--- 1 rman dba 34468 Sep 21 2006 /h/oracle/product/10r2/bin/extproc*
    -rwxr-xr-x 1 oracle dba 300 Sep 21 2006 /h/oracle/product/10r2/bin/extusrupgrade*
    bash sol root /h/oracle/product/10r2/bin 34 #
    bash sol root /h/oracle/product/10r2/bin 34 #
    bash sol root /h/oracle/product/10r2/bin 34 #
    On my system, the user 'nobody' has no shell so I cannot use nobody.
    I created a user named rman:
    bash sol root /h/oracle/product/10r2/bin 34 #
    bash sol root /h/oracle/product/10r2/bin 34 #
    bash sol root /h/oracle/product/10r2/bin 34 # su - rman
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    $
    $ id
    uid=220(rman) gid=220(rman)
    $
    $
    $ date
    Fri Sep 7 16:30:03 PDT 2007
    $
    $
    Jared points out that rman needs access to extproc:
    $ ls -la /h/oracle/product/10r2/bin/extproc
    -rwsr-x--- 1 rman dba 34468 Sep 21 2006 /h/oracle/product/10r2/bin/extproc
    $
    $
    Here is a demo of rman running his script:
    bash sol root /h/oracle/product/10r2/bin 35 # su - rman
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    $
    $
    $ ls
    scripts
    $
    $
    $ scripts/tst.sh
    $
    $
    $ cat scripts/tst.sh
    #! /bin/sh
    /usr/bin/date > /tmp/tst.sh.out.txt 2>&1 &
    exit 0
    $
    $
    $ cat /tmp/tst.sh.out.txt
    Fri Sep 7 16:31:23 PDT 2007
    $
    $ rm /tmp/tst.sh.out.txt
    $
    I am focused on this error:
    ORA-27369: job of type EXECUTABLE failed with exit code: 274662
    And I am focused on this exit code: 274662
    What does 274662 mean?
    If the Scheduler gives me an error like "274662" rather than some English,
    it's obvious to me the Scheduler is a POS and I should not use it.
    And of course,
    If I cannot run RMAN from Oracle Scheduler, I'll use cron.
    -Owen

  • How do I run a shell script via AppleScript?

    Seems obvious, "do shell script" but that doesn't work for me.
    I have an Automator app which runs a shell script, I'd like to take that into an AppleScript. My AS doesn't run the shell script. Perhaps "do shell script' is expecting the script to be located elsewhere? The rest of my AS runs fine, but the shell script doesn't.
    repeat with i from 1 to count of items in exportFolder
      do shell script
              "exiftool -overwrite_original -Photoshop:CopyrightFlag='True'"
      done
    end repeat
    As I say this works within an Automator app, what changes do I need to make it work in AppleScript?
    Thanks!

    Camelot wrote:
    repeat with i from 1 to count of items in exportFolder
    What is 'exportFolder'? Where is it defined?
    Thanks, 'exportFolder' is defined earlier in the script. The purpose of the script - which is run from within Aperture - is to rename the selected images, export them (to the 'exportFolder'), reset the version name and, using ExifTool, add metadata which Aperture does not write to exported JPEGs.
    I have a version of this which works in Automator but I couldn't see any clues there on setting the path to ExifTool.
    Here's the full (modified) script. Currently it returns an error
    Result:
    error "No file specified" number 1
    so I now need to understand if I can use 'exportFolder' (defined at the start) to tell Finder which folder to use.
    -- Creating filenames by making Version Name  from the IPTC Headline and Filename (with hypens where spaces exist). The Aperture Version Name is used to create the file's name on export. Once exported the Aperture Version Name is reset to its original.
    tell application "System Events"
              set exportFolder to (choose folder with prompt "Choose an export folder")
    end tell
    tell application "Aperture"
              set theSel to (get selection)
              if theSel is {} then
                        error "Please select an image or two!."
              else
                        repeat with theImg in theSel
      -- Creating a new Aperture Version Name which will become the exported file's filename.
                                  tell theImg
                                            set headline to (get value of IPTC tag "Headline" of theImg)
                                            set AppleScript's text item delimiters to " "
                                            set theTextItems to text items of headline
                                            set AppleScript's text item delimiters to "-"
                                            set headline to theTextItems as string
                                            set AppleScript's text item delimiters to {""}
                                            set objectName to (get value of IPTC tag "ObjectName" of theImg)
                                            set newVersion to (headline & "-" & objectName) as string
                                            set name of theImg to newVersion
                                  end tell
                        end repeat
      -- Exporting the files as JPEGs to chosen folder/Project Name using the Version Name as a filename
                        export theSel using export setting "JPEG - Original Size" to exportFolder
      -- Resetting the Aperture Version Name back to filename using IPTC Title (which should be the file's filename without suffex).
                        repeat with theImg in theSel
                                  tell theImg
                                            set title to (get value of IPTC tag "ObjectName" of theImg)
                                            set name of theImg to title
                                  end tell
                        end repeat
              end if
    end tell
    --Using ExifTool to set Photoshop Copyright Status etc
    tell application "Finder" to set theFiles to files of exportFolder as alias list
    repeat with eachFile in theFiles
              do shell script "/usr/bin/exiftool -overwrite_original -Photoshop:CopyrightFlag='True' -Photoshop:URL='http://davidgordon.co.uk/'" & quoted form of POSIX path of eachFile
    end repeat
    display dialog "Done that!" with icon note buttons "OK" default button 1 giving up after 10

  • ICal failing to run applescripts: The 'Open' button does not change to 'Run', and the script file is opened but not executed on alert.

    iCal failing to run applescripts: The 'Open' button does not change to 'Run', and the script file is opened but not executed.

    Calendar (not called iCal anymore) does not include that capability any longer, apparently.  What you have to do now is go to Automator and create a Calendar Alert action.  You can add a Run AppleScript object to the action and paste in your script there, then when you save it, it will become available as a choice in the alert menu in Calendar.

  • How to run an eCATT script in a cyclic mode?

    Hi,
    I want to run an eCATT script in a cyclic mode. i.e. It should be run for every 15 min.
    Is there any option to do this?
    Please revert back if you want any other info.
    Thanks,
    Nagarajan M,
    9820586549

    Yes, java.lang.Runtime.exec().
    Read this carefully before you do:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Don't write a line of code before you're reviewed and understood the article completely. - MOD

Maybe you are looking for

  • How do I install PFB fonts when using Windows 7 64bit?

    I got a new 64 bit computer with Windows 7. But when I copied the fonts I was using on the old computer the PFB fonts do not work any longer. The old ATMF program does not work on this computer so how do I now install the PFB fonts? //Anni

  • How to prevent users from taking print through ME23N

    Hi Everyone, Please guide me for the following query: How can we restrict users from taking print through ME23N as through print preview in ME23N user is provided an option of taking print of the document. Please guide with authorization object infor

  • Printing to LPT1 in Win 7

    Hi We have a requirement to print shipping labels from our ERP system remotely; the ERP system does this by sending a file to LPT1 which then prints the label (the printer assigned to LPT1 is typically a Zebra LP2844 or Zebra GK420d and this is done

  • Cannot see photos on device

    I'm very new to blackberry, When I take a photo nothing shows in the camera pictures folder in media! Yet the number of photos I am able to take decreases! I do not have an sd card installed just using the phones memory. Thanks in advance Dave Solved

  • Oracle BPM and PBL

    Hi All Im new in the BPM space and i will be using it for a number of projects lined up in the near future. I've done the BPM Tutorial (Expense Management) on the Oracle site and i want to start mapping other processes with this tool. Ive never used