Script to fetch in a folder and call FM EDI_DATA_INCOMMING

Hi All,
I am trying a inbound file to idoc scenario to post an idoc. The idoc files are presently placed in a folder in application server.
When the script is run the idoc file should get picked from the folder in Application server and pass it to the FM EDI_DATA_INCOMMING. I am using the below script.
startrfc -3 -d Q11 -u USER_ID -p P1234 -c CLN -l EN -h HOST_NAME -s 10 -F EDI_DATA_INCOMING -E PORT=EXT u2013E
PATHNAME=E:\usr\sap\File
This gives error .
Can you plz let me know if the script is correct and why I get the error . I have specified all parameters in the script.
Also if Instead of a folder in Application Server , I need to pick the file from an external FTP Folder, what would be the script?
Thanks in advance

Hi Markus,
I  along with basis consultant wrote the script on the smilar lines as yours. We could not directly use your script is a unix command.
We are running on windows 2008 SR2 OS . We wrote few scripts with different parameters each time none of them works. Below are the 4 scripts that we have run one by one . None of them work. They are giving similar error 
can you please check and let us know if there are any mistake in any of the below scripts?
The path name specified in the script is where we have placed the IDOC that we want to process.
Script A
E:\usr\sap\EC1\SYS\exe\uc\NTAMD64\startrfc.exe -3 -d EC1 -u usr1 -p pwd1 -c 210 -l EN -h 172.XX.X.XX -s 20 -F EDI_DATA_INCOMING -E PORT=XXR_PRT1 u2013E PATHNAME:
BR1ER1QI02\sapmnt\trans\Interface\EDI\Inbound\IDOC1.txt
Script B
======================================================================================
E:\usr\sap\ERQ\SYS\exe\uc\NTAMD64\startrfc.exe -3 -d EC1 -u usr1 -p pwd1 -c 210 -l EN -h 172. XX.X.XX -s 20 -F EDI_DATA_INCOMING -E PORT= XXR_PRT1 u2013E PATHNAME= IDOC1.txt
Script C
======================================================================================
startrfc.exe -3 -d EC1 -u usr1 -p pwd1 -c 210 -l EN -h 172.XX.X.XX -s 20 -F EDI_DATA_INCOMING -E PORT= XXR_PRT1 u2013E PATHNAME:
BR1ER1QI02\sapmnt\trans\Interface\EDI\Inbound\ IDOC1.txt
Script D
======================================================================================
startrfc.exe -3 -d EC1 -u usr1 -p pwd1 -c 210 -l EN -h 172.XX.X.XX -s 20 -F EDI_DATA_INCOMING -E PORT= XXR_PRT1 u2013E PATHNAME= IDOC1.txt
Error we are getting:
=======================================================================================
RFC Call/Exception: SYSTEM_FAILURE
Group Error group 104
Key RFC_ERROR_SYSTEM_FAILURE
Message Error at OPEN '
BR1ER1QI02\sapmnt\trans\Interface\EDI\Inbound\' (ch
eck file)
Its pretty urgent. Any help on this is highly appreciable.
Thanks

Similar Messages

  • Script/Automator Get Filenames in Folder and Move Each File into Folder based on Filename?

    I have searched for an answer to this and I have searched through multiple file renaming apps on the app store too but alas I cannot find anything that does what I want so I ended up looking into Automator as my saviour but I am a total NOOB.
    What I want to do is point automator to a folder of my choosing
    Automator then takes each file in that folder and creates a folder with the same name as the file and then move the file into that subfolder.
    Sounds easy enough eh
    I'm totally stumped, anyone have any guidance ???

    This is a PITA to do in automator - automator does not handle loops the way it should - but in applescript it looks like so (open this in the applescript editor, select the file you want to run it on in the Finder, then run the script):
    tell application "Finder"
              set mainFolders to the selection
      -- selection returns as a list, so even if there's only one folder a loop is used
              repeat with thisFolder in mainFolders
      --get the folder's contents
                        set containedItems to every item of thisFolder
                        repeat with thisItem in containedItems
      -- get name of file, add 'ƒ' to avoid name conflicts
                                  set newFolderName to (displayed name of thisItem) & " ƒ"
      --make folder, move item
                                  set newFolder to make new folder at thisFolder with properties {name:newFolderName}
      move thisItem to newFolder
                        end repeat
              end repeat
    end tell

  • A script to create a new folder and place selected items into it?

    I'd like to select a few items and have either an Apple script / contextual menu automatically create a new folder and place the selected items inside it.
    I have many, many to do—which is why I wanted to know if there is a script or automator or contextual menu thing available. Or if not, how can I create one?
    Can that be done? Thank you!

    Thank you for your help. Now I just want to expand on this a bit. To use the Applescript you have supplied me, how do I tell it to name the folder other than by date, and where to put it?
    Let me say, preferably, is it possible to make an action like this right-clickable? Instead of having to pick a script. Anything that slows this process down means I might as well do it all by hand. What I'd really love to do is this:
    Select a number of items. Right click to an action saying "create a new folder and put this items in it. Name the folder with the first item's name". Very simple and quick.
    Could this be accomplished? Through Automator? or something that can appear in the contextual menu? Folder actions?
    I'm just getting started with using these tools.

  • Need a perl script which monitors a network folder and sends email when new files/folders arrived...

    I need a perl script (or something else better) which monitors a network folder and sends email when new files/folders arrived. I tried it in Automator but failed.
    Thanks!

    Yes. I tried it. But whenever I restart m Mac, the watch folder doesn't work until I reconnect to network or run the Automator... I need a simple system that automatically connects to the network and monitor the folder, even I restart the Mac.
    Thanks!

  • Iterating through all Document Libraries, Folder and Item -Sharepoint 2010

    Hi
    I want to read all RootFolder,Subfolder along with all "items" from Document Librarie.
    Can anyone please advise on this
    Thanks

    Use caml query with recursiveall which
    will fetch all root folder and subfolder data from a document library.
    for
    your reference.
    http://sharepoint.stackexchange.com/questions/29405/get-items-under-folder-caml
    https://social.msdn.microsoft.com/Forums/office/en-US/6beba66a-adcc-4764-ba0d-ba7870d71457/recursive-caml-query?forum=sharepointdevelopmentprevious
    camlQuery.ViewXml = "<View Scope=\"RecursiveAll\"> " +
    "<Query>" +
    "<Where>" +
    "<Eq>" +
    "<FieldRef Name=\"FileDirRef\" />" +
    "<Value Type=\"Text\">/ecm/Business/Business/Projects/IDECO_P01030000</Value>" +
    "</Eq>" +
    "</Where>" +
    "</Query>" +
    "</View>";
    Regards,
    Rajendra Singh
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful http://sharepointundefind.wordpress.com/
    Regards, Rajendra Singh If a post answers your question, please click Mark As Answer on that ost and Vote as Helpful http://sharepointundefind.wordpress.com/

  • Looking to create script(s) that open a folder of image and save as each image is edited/retouched.

    I used to use the iOpener plug-in to read a folder of images and present each image to me to edit/retouch.  When I was done with the image, I clicked a button on a panel and it saved the resulting PSD in a designated destination folder and automagically retrieved the next image in the folder.  Do this repeatedly until all images in the folder were processed.  Fundy had a nice tool (Batch Editor), but it is end-of-life and not being offered anymore and iOpener seems to no longer be maintained.  Target app is Photoshop CS6 / CC.
    I want to build a simple set of scripts, embedded in a panel, that would let me replicate the basic function of these tools.  Open an image from a selected folder.  Let me do all the edits I want.  Then save the result to a designated destination folder (or just a Save and Close), the serve up the next image. 
    I have many years of software development in other languages, but relatively new to adobe scripting so am looking for example code to get me heading the right direction.  Also doesn't hurt to know whether something like this already exists and I can just use it.
    Thanks!
    -Mike Price
    Fairfield Photography

    PERFECT!!!!!!
    This is exactly what I was going to build.  No need to create when it is already done.
    Thank you very much.
    -Mike

  • Scripting: browse for data files in a folder and all subfolders below

    Hello,
    i'm looking for a command to search for data files (*.dat) in a folder and all subfolders below.
    I checked out command DirListGet. This command only search in the declared folder and not in the subfolders below.
    Anyone an idea?
    I don't want to use a loop-structure for finding subfolders and browse for the data files.
    Mr. Buddy

    dim result : result = DirListGet("C:\tmp", "*.dat", "filename", "FullFilenamesRecursive")
    dim fl : for each fl in result
    MsgBox fl
    Next
    Works fine for me and even recursive.
    Alternatively but with mucg more effort and the same result.
    Option Explicit 'Forces the explicit declaration of all the variables in a script.
    dim folderPath : folderPath = "C:\tmp"
    dim files : files = GetFileListRecursive(folderPath)
    dim fl : for each fl in files
    MsgBox fl
    Next
    Function GetFileListRecursive(folderPath)
    dim fso : Set fso = CreateObject("Scripting.FileSystemObject")
    dim results : results = Array()
    GetFiles fso, folderPath, results
    GetFileListRecursive = results
    End Function
    Sub GetFiles(fso, folderPath, results)
    dim folderObj : Set folderObj = fso.GetFolder(folderPath)
    dim f : for Each f In folderObj.Files
    if(0 = StrComp(fso.GetExtensionName(f), "dat", 1)) then
    dim index : index = ubound(results) + 1
    redim Preserve results(index)
    results(index) = f.Path
    End If
    next
    dim d : for Each d In folderObj.SubFolders
    GetFiles fso, d.Path, results
    next
    End sub

  • Need scripts for fetching groups and subgroups info , script for del users

    Hi ,
    I need a script or macro which will fetch list of groups and sub groups triend forums download did not fine one.
    I need another script which will delete listed users there is a macro in forums but it doesn't suit my rquirement.
    Any one have these scripts handy with you please help me with that,
    Regards,
    Neo.

    Hi Braham,
    Thanks for your quick reply.
    Are we able to do this on two stage method
    1. grab the security groups from the share paths
    if can grab the share path from a separate txt file than copying it to the <your path> location
    so i can modify the txt file
    once run the script
    if can the output like below to a CSV file
    \\servername\foldermain\folder1group 1group 2group 3\\servername\foldermain\folder2group 1group 2group 3then i know which groups belongs to which share paththen i can remove the duplicate groups and keep the common groups to grab the users belongs to itso with the second script same as the first copy the security groups to a txt file and the out put as below.what I needs is the users full name and the samaccount name ( user id )group 1user1user2user3
    group 2user1user2user3looking forward your help on thisThank you.Thilo

  • Script to find files with same names with in a folder and it sub folders.

    Looking for script to find files with same names with in a folder and it sub folders.

    Are you just looking to find if any two files underneath a folder have the same name?
    If you just want to know that a file named "whatever" exists in two folders, that's not too difficult, but you probably want to know the full path names.
    Here's one attempt:
    $ perl -MFile::Find -le 'find(\&w, "."); while (($n,$p)=each %file) {if(@{$p}>1){print join(" ",@{$p})}} sub w{push @{$file{$_}},$File::Find::name;}'That will print the pathnames on the same line of any files with the same name that appear anywhere underneath your current directory.
    It's a bit long for a "one-liner", but functional.
    Darren

  • Folder and Sub-Folder Batch load Script

    What I'm looking for I'm not ever sure is possible, but what I need is a script that will search for predefined sub-folder names within a specific "root" folder and run a script I have to load those images into a Photoshop document found within the root folder.  When loading these images, it will also need to place the images into a specific group within the Photoshop document, depending on the sub-folder that contained them.  So images in the sub-folder "A" need to be loaded into the group "A" in the Photoshop document, images in sub-folder "B" into group "B" and so-on.  The number and name of images within the sub-folders are, however, random; so this would also need to be accounted for.  Additionally, if possible, I would like the script to ask the user to locate this root folder each time before proceeding; otherwise, if not possible, a static folder location can also be used.  Thanks for any help!
    dgolberg

    Profile-mismatches as in: When the container document and the image to be placed are of different Color Spaces (different ICC-profiles).
    Could you give this a try (on a copy of your files naturally); it places as Smart Objects (depending on your Photoshop > Preferences > General settings), but you could always rasterize after the import or chenge the preference in the Scripts and reset it at the end:
    // place png-files from a folder and its contained folders with groups to represent those in jpg-files;
    // 2011, use it at your own risk;
    #target photoshop
    // select folder;
    var theFolder = Folder.selectDialog ("select folder");
    if (theFolder) {
    // get the jpgs;
    var theJpgs = getJpgFiles(theFolder);
    // iterate through the jpg files;
    for (var m = 0; m < theJpgs.length; m++) {
    var theDoc = app.open(new File(theJpgs[m]));
    // thanks to xbytor;
    var theName = theDoc.name.match(/(.*)\.[^\.]+$/)[1];
    // place the png-files in groups coresponding to the folders;
    placeFolderFiles(theFolder, theDoc, theName)
    ////// ceck for jpgs //////
    function checkJpg (theFile) {
        if (theFile.name.match(/\.(jpg)$/i)) {
            return true
    ////// ceck for pngs //////
    function checkPng (theFile) {
        if (theFile.name.match(/\.(png)$/i)) {
            return true
    ////// place //////
    function placeScaleFile (file, xOffset, yOffset, theScale) {
    // =======================================================
    var idPlc = charIDToTypeID( "Plc " );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc5.putPath( idnull, new File( file ) );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc5.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc6 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idHrzn, idPxl, xOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idVrtc, idPxl, yOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc5.putObject( idOfst, idOfst, desc6 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idWdth, idPrc, theScale );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idHght, idPrc, theScale );
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc5.putBoolean( idLnkd, true );
    executeAction( idPlc, desc5, DialogModes.NO );
    return app.activeDocument.activeLayer;
    ////// place images in folder and contained folders //////
    function placeFolderFiles (theFolder, theContainer, theName) {
              var theContent = theFolder.getFiles();
              for (var n = theContent.length - 1; n >= 0; n--) {
                        var theObject = theContent[n];
                        if (theObject.constructor.name == "Folder") {
                                  var aFolder = theContainer.layerSets.add();
                                  aFolder.name = Folder(theContent[n]).name;
                                  placeFolderFiles(theObject, aFolder, theName)
                        if (checkPng(theObject) == true && theObject.name.match(theName)) {
                                  var theLayer = placeScaleFile(theObject, 0, 0, 100);
                                  theLayer.name = File(theObject).name;
                                  theLayer.move(theContainer, ElementPlacement.PLACEATBEGINNING)
    ////// place images in folder and contained folders //////
    function getJpgFiles (theFolder) {
              if (!theArray) {var theArray = new Array};
              var theContent = theFolder.getFiles();
              for (var n = theContent.length - 1; n >= 0; n--) {
                        var theObject = theContent[n];
                        if (theObject.constructor.name == "Folder") {
                                  theArray = theArray.concat(getJpgFiles(theObject))
                        if (checkJpg(theObject) == true) {
                                  theArray.push(theObject)
              return theArray

  • Create new folder and move items script

    Hello
    Im new to applescript and automator.
    I've been looking high and low for something and figured I should ask the pros here...
    I want the ability to have a "hot folder" that when ever anything is placed in the folder, a new folder is created in the top directory of that hot folder using the modified date as the new folders name and the contents of the hot folder are moved to the correct folder.
    My thought was to upload pictures to this folder (on an external drive) and have the script put them in the correct folder that was created by the script. I could use either "modified date" "created date"...
    Is this common? Possible?
    Any ideas how I could do this?
    Thanks All!!!

    a new folder is created in the top directory of that
    hot folder using the modified date as the new folders
    name
    Is that the modified date of the files that you
    dragged to the "hot folder"?
    If so, that would probably require AppleScript since
    Automator can't get that information from the files.
    For the rest of it-as a starting point
    New Folder
    Rename Finder Items (Add Date and Time)
    Save As Plugin- for Folder Action - attach to your
    hot folder.
    Note: You don't want to create the new folder in the
    hot folder, doing so will likely cause it to loop
    continuously.
    Yes I would like to pull the "created date" or "modified date" from the files I drop in the HOT Folder and use that date as the new folders name.
    So if I put 10 pictures in that Hot Folder and 5 had the same created date then those 5 would go to one newly created folder et cetera..
    And no, the new folder will be either above or along side the Hot folder. Not in it.. good catch!

  • Scripted Host Adapter and calling Scripts

    I have a Scripted Host Adapter that I created in the admin console under resources. I have attached 6 scripts to the adapter to do different functions on the mainframe. We aren't going to use this adapter as an adapter per say. We want to just be able to call the scripts from a workflow to do the intended actions that we need done on the mainframe. How do I go about calling various scripts from a workflow? Does anyone know exactly how I would go about doing this? Not sure how much anyone uses Scripted Host Adapter.

    Hi i need to call the action script from the workflow .and modify the account in top-secret,
    i used the fallowing code for this but nothing is found...
    can u plz help me on this issue..
    i am using the fallowing code
    <!-- MemberObjectGroups="#ID#Top" createDate="Thu Apr 26 10:33:43 CDT 2007" extensionClass="WFProcess" id="#ID#8FD20508FFD1CFF7:5DA25165:1122E531698:-7FFC" name="Ameren Modify TopSecret Account" visibility="runschedule"-->
    <TaskDefinition id='#ID#8FD20508FFD1CFF7:5DA25165:1122E531698:-7FFC' name='Modify TopSecret Account' creator='Configurator' createDate='1177601623578' lastModifier='Configurator' lastModDate='1178229418812' lastMod='494' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='delete' visibility='runschedule' progressInterval='0'>
    <Extension>
    <WFProcess name='Modify TopSecret Account' maxSteps='0'>
    <Variable name='modifyObject' input='true'/>
    <Variable name='accountId' input='true'/>
    <Variable name='tempPassword' input='true'/>
    <Variable name='modifyview'/>
    <Variable name='view'/>
    <Variable name='TSResource' value='TopSecret'/>
    <Activity id='0' name='start'>
    <Transition to='Modify Accounts'/>
    <WorkflowEditor x='127' y='49'/>
    </Activity>
    <Activity id='1' name='Modify Accounts'>
    <Action id='0' name='Checkout View' application='com.waveset.session.WorkflowServices' hidden='true'>
    <Argument name='op' value='checkoutView'/>
    <Argument name='type' value='User'/>
    <Argument name='id' value='$(accountId)'/>
    <Return from='view' to='user'/>
    </Action>
    <Action id='1' name='get Resource Object' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='getObject'/>
    <Argument name='type' value='Resource'/>
    <Argument name='name' value='ScriptedHost'/>
    <Return from='object' to='resourceObject'/>
    </Action>
    <Action id='2' name='get Resource Action' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='getObject'/>
    <Argument name='type' value='ResourceAction'/>
    <Argument name='name' value='Example Login Action'/>
    <Return from='object' to='resourceAction'/>
    </Action>
    <Action id='3'>
    <expression>
    <block>
    <set name='ScriptedHostResource'>
    <new class='com.waveset.adapter.ScriptedHostResourceAdapter'>
    <ref>resourceObject</ref>
    <invoke name='getCache'>
    <invoke name='getLighthouseContext'>
    <ref>WF_CONTEXT</ref>
    </invoke>
    </invoke>
    </new>
    </set>
    <set name='actionResult'>
    <invoke name='TS Update User Action'>
    <ref>ScriptedHostResource</ref>
    <ref>resourceAction</ref>
    <map>
    <block trace='true'>
    <append name='TSuser.waveset.resources'>
    <s>TopSecret</s>
    </append>
    <set name='user.accounts[TopSecret].accountId'>
    <ref>modifyObject.accountId</ref>
    </set>
    <set name='user.accounts[TopSecret].fullname'>
    <ref>modifyObject.fullname</ref>
    </set>
    <set name='user.accounts[TopSecret].job'>
    <ref>modifyObject.job</ref>
    </set>
    <set name='user.accounts[TopSecret].TSO Access'>
    <ref>modifyObject.TSO_Access</ref>
    </set>
    <set name='user.accounts[TopSecret].Department'>
    <ref>modifyObject.department</ref>
    </set>
    </block>
    </map>
    </invoke>
    </set>
    </block>
    </expression>
    </Action>
    <Action id='4' name='Checkin User View' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='checkinView'/>
    <Argument name='view' value='$(user)'/>
    </Action>
    <Transition to='end'/>
    <WorkflowEditor x='219' y='178'/>
    </Activity>
    <Activity id='2' name='end'>
    <WorkflowEditor x='454' y='181'/>
    </Activity>
    </WFProcess>
    </Extension>
    <MemberObjectGroups>
    <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
    <Properties>
    <Property name='editorOriginalName' value='Ameren Modify TopSecret Account'/>
    </Properties>
    </TaskDefinition>
    plz do correct if needed .........
    thanks in adavce..
    --jem                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • TS3276 cannot receive mail after i sent a large photo.   A new folder appeared called "recovered messages" with the over 100 recovered emails of the same email of the one i sent out.  i have read apple support and done everything they suggest.  Help!

    I cannot receive mail after i sent a large photo.   A new folder appeared called "recovered messages" with the over 100 recovered emails of the same email of the one i sent out.  i have read apple support and done everything they suggest.  Help!

    How large is 'large'?

  • Run the jcwde once and call many APDU scripts simultaneously?

    Hello everybody.I currentrly try to develop an applet and I was wondering if it is possible to run the jcwde tool just once and call many apdu scripts(.scr files).
    For example let says that you create an applet which has functions(INStrunctions) such as:
    1)Verify Pin
    2)Create a Record
    3)Read a Record and e.tc...
    In one window you ran the jcwde tool and you open let say 2 windows.In the first DOS-window you call the APDU script for the verifation of the PIN and in the second window you ran the APDU script which is responsible for creating a record.(but the jcwde is ran just once)
    I will really appreciate any help and asistance.
    Thanks.

    Hello again.I used to run multiple APDU script by using the apdutool and the jcwde once.
    I tied today to run the multiple APDU scripts from the DOS but I had problem.The code of the APDU scripts are :
    //Code of the createNew.scr
    powerup;
    //Select the installer-invoke the on-card installer
    //CLA INS P1 P2 Lc |--- data fields==Lc ----------|
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
    //create Newapplet-From the file jcwde.app(AID) Le=8..PINnumber=0102030405-Declare it here
    0x80 0xB8 0x00 0x00 0x13 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x9 0x1 0x07 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x7F;
    //Select Newapplet
    0x00 0xA4 0x04 0x00 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x9 0x1 0x7F;
    //powerdown;
    And the code of the verify script is:
    //powerup;
    //Verify user's PIN input
    //Cla INS P1 P2 Lc |--- PIN data from the demo1.scr APDU script--
    0xB1 0x10 0x00 0x00 0x07 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x7F;
    powerdown;
    AS you can see the powerup command included only in the first file and the powerdown command in the second file.
    I executed the files from the DOS command as following:
    c:\>apdutool createNew.scr verify.scr
    But it returns me the message:
    com.sun.javacard.apdutool.ReaderWriterError: Lexical error at line 12, column 13
    . Encountered <EOF> after "//powerdown;".
    com.sun.javacard.apdutool.ReaderWriterError: Card powered down. (0x15)
    The first file createNew.scr is executed properly and then it displays me the above message.
    I also tried to run the multiple scripts with including the powerup and powerdown commands in the both files.No result.
    Have you got idea what is going on?
    Thank you.

  • Creating parameters dynamically and calling a procedure but strange issue

    Okay I have the following program that is calling a procedure(data_compare_utility)[pasted below] and data_compare_table_setup table definition and data(isert scripts) are pasted below :
    DECLARE
    --FP_OLD_TABLE VARCHAR2(200);
    --FP_NEW_TABLE VARCHAR2(200);
    --FP_DATA_COMPARE_ID NUMBER(10) := 1;
    --FP_RESTRICTION_CLAUSE VARCHAR2(500) := 'WHERE W_INSERT_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'') OR W_UPDATE_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'')';
    --FP_RESTRICTION_CLAUSE_4_INS VARCHAR2(500) := 'WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')';
    cursor c_data_compare_table_setup
    is
    select table_name, old_schema_name, new_schema_name, data_compare_id, restriction_clause, restriction_clause_ins from DATA_COMPARE_TABLE_SETUP;
    r_of_data_compare_table_setup c_data_compare_table_setup%rowtype;
    Lv_args_4_data_compare_utility varchar2(500);
    BEGIN
    --FP_OLD_TABLE := 'BIAPPS_11.RAHUL_EMPLOYEES';
    --FP_NEW_TABLE := 'RAHULKALRA.RAHUL_EMPLOYEES';
    open c_data_compare_table_setup;
    Loop
    fetch c_data_compare_table_setup into r_of_data_compare_table_setup;
    exit when c_data_compare_table_setup%NOTFOUND;
    --exec RAHULKALRA.P_COMPARE_DATA_UTILITY
    Lv_args_4_data_compare_utility := ''''||r_of_data_compare_table_setup.OLD_SCHEMA_NAME||'.'||r_of_data_compare_table_setup.TABLE_NAME||''','''||r_of_data_compare_table_setup.NEW_SCHEMA_NAME||'.'||r_of_data_compare_table_setup.TABLE_NAME||''','||r_of_data_compare_table_setup.DATA_COMPARE_ID||','''||r_of_data_compare_table_setup.RESTRICTION_CLAUSE||''','''||r_of_data_compare_table_setup.RESTRICTION_CLAUSE_INS||'''';
    P_COMPARE_DATA_UTILITY(Lv_args_4_data_compare_utility);
    commit;
    End Loop;
    dbms_output.put_line('rahul');
    dbms_output.put_line(''''||r_of_data_compare_table_setup.OLD_SCHEMA_NAME||'.'||r_of_data_compare_table_setup.TABLE_NAME||''','''||r_of_data_compare_table_setup.NEW_SCHEMA_NAME||'.'||r_of_data_compare_table_setup.TABLE_NAME||''','||r_of_data_compare_table_setup.DATA_COMPARE_ID||','''||r_of_data_compare_table_setup.RESTRICTION_CLAUSE||''','''||r_of_data_compare_table_setup.RESTRICTION_CLAUSE_INS||'''');
    --P_COMPARE_DATA_UTILITY('BIAPPS_11.RAHUL_EMPLOYEES','RAHULKALRA.RAHUL_EMPLOYEES',1,'WHERE W_INSERT_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'') OR W_UPDATE_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'')','WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')');
    --P_COMPARE_DATA_UTILITY('BIAPPS_11.RAHUL_EMPLOYEES','RAHULKALRA.RAHUL_EMPLOYEES',1,'WHERE W_INSERT_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'') OR W_UPDATE_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'')','WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')');
    close c_data_compare_table_setup;
    END;
    Procedure : compare_data_utility:
    CREATE OR REPLACE procedure RAHULKALRA.p_compare_data_utility(fp1_old_table in varchar2, fp2_new_table in varchar2, fp3_data_compare_id in number, fp4_restriction_clause in varchar2, fp5_recrtiction_clause_4_ins in varchar2)
    as
    Lv_common_column_names varchar2(2000);
    Lv_primary_column_name varchar2(50);
    Lv_insert_data_compare_log varchar2(2000);
    --Lv_counter number(10);
    Lv_row_id_for_data_compare_log number(10);
    Lv_old_table_record_count number(10);
    Lv_old_table_rec_cnt_query varchar2(200);
    Lv_new_table_record_count number(10);
    Lv_new_table_rec_cnt_query varchar2(200);
    begin
    select max(row_id) into Lv_row_id_for_data_compare_log from data_compare_log;
    Lv_old_table_rec_cnt_query := 'Select count(*) from '||fp1_old_table||' '||fp4_restriction_clause;
    dbms_output.put_line(Lv_old_table_rec_cnt_query);
    execute immediate Lv_old_table_rec_cnt_query into Lv_old_table_record_count;
    Lv_new_table_rec_cnt_query := 'Select count(*) from '||fp2_new_table||' '||fp4_restriction_clause;
    execute immediate Lv_new_table_rec_cnt_query into Lv_new_table_record_count;
    dbms_output.put_line(fp5_recrtiction_clause_4_ins);
    if (Lv_row_id_for_data_compare_log is null)
    then
    Lv_row_id_for_data_compare_log := 1;
    else
    Lv_row_id_for_data_compare_log := Lv_row_id_for_data_compare_log + 1;
    end if;
    Lv_insert_data_compare_log := 'insert into data_compare_log values('||Lv_row_id_for_data_compare_log||',''comparing data for '||fp1_old_table||' and '||fp2_new_table||''','''||fp1_old_table||''','''||fp2_new_table||''',TO_DATE('''||to_char(sysdate,'DD-MON-YY HH24:MI:SS')||''',''DD-MON-YY HH24:MI:SS''),'||fp3_data_compare_id||','||Lv_old_table_record_count||','''||'Select count(*) from '||fp1_old_table||' '||fp5_recrtiction_clause_4_ins||''','||Lv_new_table_record_count||','''||'Select count(*) from '||fp2_new_table||' '||fp5_recrtiction_clause_4_ins||''')';
    dbms_output.put_line(Lv_insert_data_compare_log);
    execute immediate Lv_insert_data_compare_log;
    commit;
    -- tested : dbms_output.put_line(Lv_insert_data_compare_log);
    Lv_common_column_names := f_fetch_common_column_names(fp1_old_table,fp2_new_table,fp3_data_compare_id);
    -- tested : dbms_output.put_line(Lv_common_column_names);
    Lv_primary_column_name := f_extract_pkey_column_names(fp1_old_table, fp2_new_table);
    dbms_output.put_line(Lv_primary_column_name);
    p_compare_data(fp1_old_table,fp2_new_table,Lv_common_column_names,Lv_primary_column_name,fp4_restriction_clause,fp3_data_compare_id);
    end;
    CREATE TABLE RAHULKALRA.DATA_COMPARE_TABLE_SETUP
    TABLE_ID NUMBER(10),
    TABLE_NAME VARCHAR2(100 BYTE),
    OLD_SCHEMA_NAME VARCHAR2(100 BYTE),
    NEW_SCHEMA_NAME VARCHAR2(100 BYTE),
    RESTRICTION_CLAUSE VARCHAR2(500 BYTE),
    RESTRICTION_CLAUSE_INS VARCHAR2(500 BYTE),
    DATA_COMPARE_ID NUMBER(10)
    Insert into DATA_COMPARE_TABLE_SETUP
    (TABLE_NAME, OLD_SCHEMA_NAME, NEW_SCHEMA_NAME, DATA_COMPARE_ID, RESTRICTION_CLAUSE, RESTRICTION_CLAUSE_INS)
    Values
    ('W_CHNL_TYPE_D', 'BIAPPS_11', 'RAHULKALRA', 1, 'WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')', 'WHERE W_INSERT_DT >= TO_DATE(''''''''01/JAN/2012'''''''',''''''''DD/MON/YYYY'''''''') OR W_UPDATE_DT >= TO_DATE(''''''''01/JAN/2012'''''''',''''''''DD/MON/YYYY'''''''')');
    Insert into DATA_COMPARE_TABLE_SETUP
    (TABLE_NAME, OLD_SCHEMA_NAME, NEW_SCHEMA_NAME, DATA_COMPARE_ID, RESTRICTION_CLAUSE, RESTRICTION_CLAUSE_INS)
    Values
    ('RAHUL_EMPLOYEES', 'BIAPPS_11', 'RAHULKALRA', 1, 'WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')', 'WHERE W_INSERT_DT >= TO_DATE(''''''''01/JAN/2012'''''''',''''''''DD/MON/YYYY'''''''') OR W_UPDATE_DT >= TO_DATE(''''''''01/JAN/2012'''''''',''''''''DD/MON/YYYY'''''''')');
    I am facing the following error for this command when I call P_compre_data_utility procedure from my anonymous block:
    P_COMPARE_DATA_UTILITY(Lv_args_4_data_compare_utility); -- the error is pasted below
    if I do a dbms_output.put_line(Lv_args_4_data_compare_utility) and then copy paste its output and call P_COMPARE_DATA_UTILITY, the procedure is getting executed, here is that command :
    P_COMPARE_DATA_UTILITY('BIAPPS_11.RAHUL_EMPLOYEES','RAHULKALRA.RAHUL_EMPLOYEES',1,'WHERE W_INSERT_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'') OR W_UPDATE_DT >= TO_DATE(''01/JAN/2012'',''DD/MON/YYYY'')','WHERE W_INSERT_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''') OR W_UPDATE_DT >= TO_DATE(''''01/JAN/2012'''',''''DD/MON/YYYY'''')');
    Error:
    ORA-06550: line 27, column 7:
    PLS-00306: wrong number or types of arguments in call to 'P_COMPARE_DATA_UTILITY'
    ORA-06550: line 27, column 7:
    PL/SQL: Statement ignored
    Question : just want to know whats wrong with : P_COMPARE_DATA_UTILITY(Lv_args_4_data_compare_utility);
    please help me.
    Regards
    Rahul

    Mac_Freak_Rahul wrote:
    Hi All,
    I am really sorry, my head is so aching since I am not a regular plsql coder and to save my life I need to write this code for data comparison between 2 tables .. further sorry about calling p_data_compare utility stupidly : P_COMPARE_DATA_UTILITY(Lv_args_4_data_compare_utility);
    I am calling it now using :
    execute immediate 'exec P_COMPARE_DATA_UTILITY('||Lv_args_4_data_compare_utility||')';If you are sure the call works then, exec would not work since it is a SQLPLUS command.
    try
    execute immediate 'BEGIN P_COMPARE_DATA_UTILITY(''||Lv_args_4_data_compare_utility||''); END;';
    PS: I can manually give table names to my utility , just need 60 tables to compare but would be great if I can work it out this eay.
    2) I can sound very stupid since my head is aching I am not a regular plsql coder but from now on I would be one, please helpJust for your sake, to Compare 60 tables (Supposing you just want to verify count of records), you are writing an entire procedure; You might have completed this activity by now doing the manual way. By taking this way, you are investing time to generate a correct code (as you just mentioned not being a regular plsql developer) you are stuck with some un-identifiable issues.
    As an alternate way, I would suggest you to export the data, after ordering, into a spreadsheet and then validate. Also, since it looks like you are comparing the data in the same database between schemas, you can also use the SQL Navigators Data Compare utility and there are many more readily available in market.
    I would wish you the best if you still prefer taking the approach.

Maybe you are looking for