running this code

Hai All

declare
pin_no varchar2 (26);
date of pin_date;
pin_time varchar2 (25);
Ilan varchar2 (200);
m_file TEXT_IO. TYPE_DE_FICHIER;
m_file_path varchar2 (100): =: global.filename;
number of line_count;
M_BARCODE VARCHAR2 (26);
DATE OF M_BARDATE;
M_BARTIME varchar2 (25);
Number of M_No;
Cursor c1 is
Select the barcode, bardate, bartime
-ROW_NUMBER() (partition by bartime barcode order): the nurse
of temp_attendance

order by bar code, bardate;
Start
-Open c1;
If m_file_path is not null then
m_file: = TEXT_IO.fopen (m_file_path, 'r');
-ELIMINATION OF temp_attendance;
Loop
Start
go_block ('TEST_MS1');
clear_block (no_validate);
TEXT_IO.get_line (m_file, Mstr);
MSTR: = ltrim (rtrim (mstr));
M_barcode: = substr (mstr, 1, 16);
M_bardate: is to_date (substr (mstr, 17, 8), ' DD/MM/YYYY');.
M_bartime: = (substr (mstr, 25, 4));

INSERT INTO temp_attendance (BARCODE, BARDATE, BARTIME) VALUES (M_BARCODE, M_BARDATE, M_BARTIME);
Exception
When no_data_found then
TEXT_IO.fclose (m_file);
"exit";
End;
End loop;
-go_block('TEST_MS1');
-clear_block (no_validate);
To r1 c1 loop
: bar code: = r1.barcode;
: bardate: = r1.bardate;
: bartime: = r1.bartime;
next_Record;
end loop;
premier_enregistrement;
end if;
exception
while others then
forms_ddl ('commit');
message (sqlerrm);
end;

While I'm running this code with the help of the command directly goes to loop and its execution there and my first loop does not run

How to change my code to run in good fashion.

Thanks and greetings

Srikkanth.M

check your non-null

m_file_path varchar2(100) := :global.filename;
...
.
.

If m_file_path is not null then

check that the value is Global.filename or not?

Bangoura
[My Oracle Blog | http://baigsorcl.blogspot.com/]

Tags: Oracle Development

Similar Questions

  • It is a new connection created when I run this code?

    Hello everyone,

    Anyone know tell me if a new connection with the database, it is created when I run this code?

    I use JDeveloper Studio 11.1.1.4.0.

    ADF Swing application.

      //Método que exclui os endereços filhos de Observador
      private static void excluirEnderecoObservadorPanelGrid(Row row) {
          String appModule = "hidro2.gov.snirh.ig.hidro.model.adf.app.AppModuleGlobalTabApoio";
          String config = "AppModuleGlobalTabApoioLocal";
          ApplicationModule am = Configuration.createRootApplicationModule(appModule, config);
          ViewObject voObtemEnderecoObservador = am.findViewObject("ViewObjEndObservador1");
          
          try {          
            
              voObtemEnderecoObservador.setNamedWhereClauseParam("END_OBS_ID", row.getAttribute("ObsId"));
              voObtemEnderecoObservador.executeQuery();
              
              if (voObtemEnderecoObservador.getRowCount() > 0) {
                 Row rowEndereco = voObtemEnderecoObservador.first();
                 rowEndereco.remove();
                 am.getTransaction().commit();
              }
      
          } catch (Exception ex) {
              ex.printStackTrace();        
          }
    }

    Hello

    You must free request module after the creation.

    ApplicationModule m = Configuration.createRootApplicationModule (appModule, config);

    In the finally block, add the code below

    Configuration.releaseRootApplicationModuleHandle (appModule, true);

  • I can´t know pass this code AS1 to AS2

    Hello! =]

    I have can´t manage to run this code in flash8(actionscript 2)
    I mean, it works when I put a 'flash version 6' or less

    but, im sure this is an Actionscript 1 code (although I publish in flash 8 AS1 and continues to do not work only in version 6)

    and I REALLY need in my swf file is main witch is an 8 flash (actionscript 2)

    * I tried so many things to get this working thing... but I failed

    can anyone SAVE me?



    in the enterFrame clipevent, you use the vx and vy without first initializing them variables. put the following two lines in your clipevent of load:

    VX = 0;
    Vy = 0;

  • I'm running Vista 64 on a Hp laptop. I keep trying to install updates for Windows, but it still fails after a full download etc. The error code is 8007371B. I can't find any reference to this code on the Microsoft site. __

    The error code is 8007371B.  I also have a problem with Media Player, where he can't identify a DLL so why I'm doing all the 26 updates

    0X8007371B ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE

    Run this tool:

    Description of the update of the system for Windows Vista tool
    http://support.Microsoft.com/kb/947821

    TaurArian [MVP] 2005-2010 - Update Services

  • This code were not run if an error occurs?

    I created a script to remove tables as below.
     DECLARE
        v_sql VARCHAR2(4000);
     BEGIN
         FOR obj IN (select table_name from user_tables) 
      LOOP
          v_sql := 'drop table  ' || obj.tablename';
          dbms_output.put_line(v_sql);
       EXECUTE IMMEDIATE v_sql;
        END LOOP;
      END;
    But, if oracle encounters an error, say an error like
    ORA-02449: unique/primary keys in table referenced by foreign keys
    This code will break out of the loop and stop the execution. Right?

    After getting the typo is included in your example:

    -ORA-01756: city not properly finished chain
    -component 'TABLENAME' must be declared

    The answer to your question is: right, but you could have tested this easily yourself of course.

    SQL> select constraint_name, constraint_type, table_name from all_constraints where table_name in ('TABLE1', 'TABLE2');
    
    CONSTRAINT_NAME                C TABLE_NAME
    ------------------------------ - ------------------------------
    SYS_C0020788                   P TABLE1
    C1                             R TABLE1
    SYS_C0020789                   P TABLE2
    C2                             R TABLE2
    
    4 rows selected.
    
    Elapsed: 00:00:00.21
    SQL> DECLARE
      2      v_sql VARCHAR2(4000);
      3   BEGIN
      4       FOR obj IN (select table_name from user_tables)
      5  .
    SQL> DECLARE
      2      v_sql VARCHAR2(4000);
      3   BEGIN
      4       FOR obj IN (select table_name from user_tables where table_name in  ('TABLE1', 'TABLE2'))
      5  LOOP
      6        v_sql := 'drop table  ' || obj.tablename';
      7        dbms_output.put_line(v_sql);
      8     EXECUTE IMMEDIATE v_sql;
      9      END LOOP;
     10    END;
     11  /
    ERROR:
    ORA-01756: quoted string not properly terminated
    
    Elapsed: 00:00:00.11
    SQL> DECLARE
      2      v_sql VARCHAR2(4000);
      3   BEGIN
      4       FOR obj IN (select table_name from user_tables where table_name in  ('TABLE1', 'TABLE2'))
      5  LOOP
      6     v_sql := 'drop table  ' || obj.tablename;
      7        dbms_output.put_line(v_sql);
      8     EXECUTE IMMEDIATE v_sql;
      9      END LOOP;
     10    END;
     11  /
       v_sql := 'drop table  ' || obj.tablename;
                                      *
    ERROR at line 6:
    ORA-06550: line 6, column 35:
    PLS-00302: component 'TABLENAME' must be declared
    ORA-06550: line 6, column 4:
    PL/SQL: Statement ignored
    
    Elapsed: 00:00:00.07
    SQL>  DECLARE
      2        v_sql VARCHAR2(4000);
      3     BEGIN
      4         FOR obj IN (select table_name from user_tables where table_name in  ('TABLE1', 'TABLE2'))
      5    LOOP
      6          v_sql := 'drop table  ' || obj.table_name;
      7         dbms_output.put_line(v_sql);
      8      EXECUTE IMMEDIATE v_sql;
      9       END LOOP;
     10     END;
     11  /
    drop table  TABLE2
     DECLARE
    *
    ERROR at line 1:
    ORA-02449: unique/primary keys in table referenced by foreign keys
    ORA-06512: at line 8
    
    Elapsed: 00:00:00.23
    SQL> desc table1
     Name
     ----------------------------------------------------------------------
     COL1
     COL2                                                                   
    
    SQL> desc table2
     Name
     ----------------------------------------------------------------------
     COL1
     COL2                                                                   
    
  • How to run Matlab code in labview for Binay coded on a file.

    Dear Sir/Madam,

    I saw a binary coded and Matlab code too, but I'm not able to open this file, so I want to open and run this file under the Matlab code. This image is what I want to do and also attached here file and matlab entry code.

    Hello

    Your script reads the data from the .dat file and gives a 3D Board. Unfortunately, MathScript currently can not handle 3D Board.

    In addition, you can use the following code to read the data in LabVIEW.

  • This code cannot possibly. Why is it a failure?

    LV 2010 (Yes 2010), Win Vista.

    I have a SCREEN UPDATE event, occurring at 2 Hz.

    The event features an array of values, one for each channel.

    Four CHANNEL SELECTORS lead an INDEX TABLE operation.

    The four selected channels are shown separately on digital indicators and then combined with a waveform graph.

    The small subVIs are there to produce a NaN value to draw if the channel selector is - 1 (none).

    Currently, they are modified to generate a value for "123.0", for debugging purposes.

    AID indicates that the TABLE INDEX will produce a default value of 0 if the input index is outside the bounds of the array.

    However, in certain circumstances (see JING http://screencast.com/t/0kO0GDhlo0E), indicators of the "VALUE of the GRAPH' fail to update.

    In this video, I put the indicators to the values of 1, 2, 3, 4, before to start the program.

    I DO NOT set the DEFAULT value, simply enter the numbers in the lights on the Panel.

    The two selected channels are apparently normally updated.  The other two, who remain at ZERO (-1) do not update.

    I expect to see a zero, or SOMETHING, but the '3' and '4' never change.

    This code is called, as evidenced in the table of progress, but the values do not change.

    If I change the channel on a direct channel, then back to ZERO, it returns 0.  Which is expected.

    But why it isn't updated first?

    If I exchange the channel around selectors, the problem swaps with her. Any selector set to NONE has the corresponding indicator unchanged compared to the starting value.

    ON THE CODE:

    It is a CONCAVE VI, inserted in a secondary SCHOOL.

    Here is the embed code:

    The idea is that each control on the page is a secondary, each will receive an instance of a VI.

    For each school, I open a new ref becomes this VI (he put to be reentrant) and insert this ref in the secondary.

    I put a few values of control and launch it running.

    HIGHLIGHTS:

    1... If I change the OPTIONS = 8 options = 0 in the above, the problem goes away. Everything works as expected.

    2... N = 1 in the above, is simply to limit the number of instances, for debugging purposes.

    3... I get no error at any time.

    4... I tried with and without wire at the entrance to REFNUM REFERENCE OPEN VI VI TYPE SPECIFIER.  No change.

    A research on this topic raises some issues of 2008 with LV 8.0, and a suggestion there to serve the point inserted into a LIVING had no effect here.

    So, why not the seeing if the index is - 1, initially?  It's as if the code is not there.

    And why making it not reentrant fixed it?

    (I think I got this way so I can have multiple instances).


  • Why can't I just run the code developed in Lookout Lookout 6.5 6.2?

    Our client has developed the code in point 6.2 Lookout. Now that they have purchased Lookout Run Time 6.5 and they are unable to run their code. Is there a limitation that could cause this kind of behavior?

    Thank you...

    They should be able to run the .lks file.

    The .l4p file is not compatible.

    What is the error, they got?

  • My Vista system trying to download the updates, and it does not complete the download. It is up to "Windowsupdate_00000646" and "windowsupdate_dt000" How do I clear this code to receive these updates?

    My Vista system trying to download the updates, and it does not complete the download. It is up to "Windowsupdate_00000646" and "windowsupdate_dt000" How do I clear this code to receive these updates?

    They are only updated office or all updates?

    For Office updates, usually to pick up the item at the: http://www.microsoft.com/downloads/en/default.aspx

    then manually download and install the same.

    If all updates, perhaps consider the following general tips-

    Option: File of Windows Update agent wups2.dll is incorrectly registered and the registry associated with the Wups2.dll file files are missing.

    Method 1: Save the Windows Update files

    1. Click Start and type notepad in the box start the search.
    2. click on Notepad in the list programs.
    3. copy the following commands, and then paste them into the opened Notepad window:
    REGSVR32 WUPS2. DLL/S
    REGSVR32 STINKS. DLL/S
    REGSVR32 WUAUENG. DLL/S
    REGSVR32 WUAPI. DLL/S
    REGSVR32 WUCLTUX. DLL/S
    REGSVR32 WUWEBV. DLL/S
    REGSVR32 JSCRIPT. DLL/S
    REGSVR32 MSXML3. DLL/S
    4. in Notepad, on the file menu, click Save as.
    5. in the file type list, click all files.
    6. in the file name box, type register.bat.
    7. save the Register.bat file to your desktop.
    8 right-click the Register.bat file, and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password or click on continue.
    9. try to reinstall updates.

    http://support.Microsoft.com/kb/958053
    See: method 1: save the Windows Update files

    http://support.Microsoft.com/kb/326253
    Method 5: Registry Windows Update engine files

    http://support.Microsoft.com/kb/971058
    How to reset the Windows Update components?

    Method 2: Download and install Windows Update agent

    Windows Update Agent

    How to get the latest version of the Windows Update Agent to help manage updates on a computer
    http://support.Microsoft.com/kb/949104

    Information for network administrators about how to obtain the latest Windows Update Agent
    http://support.Microsoft.com/kb/946928

    Click Start, click run, click Browse, navigate to the file you saved and click Open.

    Add the switch /wuforce at the end of the command run and then click OK. For example, the command run might look like this: "C:\WindowsUpdateAgent30-x86.exe" /wuforce

    Click run.

    Follow the steps to complete the wizard.

    Important

    To reinstall Windows Update Agent - download the relevant file from one of the links provided above and save it to a drive where Vista is not loaded because the file cannot be launched directly from the root directory of the system.

    Click Start, run, type: "D:\WindowsUpdateAgent30-x86.exe /wuforce" (without the quotes) and press ENTER to install the Windows Update engine.

    Note: There is a space between "D:\WindowsUpdateAgent30-x86.exe" and "/ wuforce.

    D: is the drive where Windows is not installed (IE a flash drive or a 2nd hard drive etc.)

    TaurArian [MVP] 2005-2010 - Update Services

  • There is not enough free memory to run this program. Quit one or more programs and then try again

    can someone help me?

    I can't open the main folders such as documents, etc. I can't open the control panel. Repeated me error Explorer.exe there is not enough memory to run this program. Quit one or more programs and try again. Then, the audio has an x mark, that even with the internet icon has an x mark but I can use the browsers and the internet.when I click on brand x audio it is said that the audio service is not running, I think it happened after that I editing the permissions on the registry key for visual basic 2010. anyone from microsoft, please help.

    The same thing happened to me, and finally I found the solution, you're right, it's a registry Permission problem, what I tried and did not help:
    -Mod safe - the same error
    -Antivirus Live CD (Nothing found)
    -Restore a backup of the registry - not worked
    -Even worse, it is impossible to install software

    And here is the solution:
    1. start a command as administrator prompt
    2 copy and paste Foollowing code and press enter

    secedit/configure /cfg %windir%\inf\defltbase.inf/db defltbase.sdb / verbose

    3. reboot your system

    For more information, please visit my Blog (it's not in English)

    http://www.Sordum.NET/16937/Windows-Explorer-e-tiklandiginda-yeterli-Bos-bellek-Yok-uyarisinin-cozumu/

  • Illegal state Exception when running the code at startup

    Here's my main method:

        public static void main(String[] args)
        {
            if (args.length == 1 && args[0].equals("startup"))
            {
                Criteria locationCriteria = new Criteria();
                locationCriteria.setCostAllowed(false);
                LocationProvider mlocationProvider;
                Location mLocation = null;
                try
                {
                    mlocationProvider = LocationProvider
                            .getInstance(locationCriteria);
                    mLocation = mlocationProvider.getLocation(-1);
                }
                catch (LocationException e) {
                }
                catch (InterruptedException e) {
                }
                QualifiedCoordinates mQC = mLocation.getQualifiedCoordinates();
            }
            else
            {
                MyApp theApp = new MyApp();
                theApp.enterEventDispatcher();
            }
        }
    

    The method

     mlocationProvider = LocationProvider.getInstance(locationCriteria); 
    

    throws the illegal state exception

    When I check the debug information, I found this exception are thrown to the line when he calls Application.getApplication ();

    When I move this code to run in a normal life to screen it works fine. !

    Any help?

    There may be a number of issues here:

    (1) until your Application is actually running, you can't really do any processing.  Your Application does not start running until you

    'enterEventDispatcher() '.

    Hand, all you should do is instantiate your Application.  Manufacturer of your Application should not do anything complicated either, since it works as part of main().

    You can do some activities, for example to add listeners, in main() code that is, in some respects, unfortunate because it lulls people into thinking they can do anything.  ,

    (2) get the location as you do, is a blocking call.  If you need to do it on a background Thread.  You c a get away with that on the Simulator because GPS simulated returns immediately with a location.  So it does not actually block.  But on a real device, code as you can force your application to break.

    (3) you seem to try to do something in the commissioning.  You must be aware, this start-up up is called as part of the start-up of the device and before the unit is fully active.  In fact, I think on a real device that this code will fail because the device is not ready to provide a location in the beginning upward.

    You will find find article, informative and useful for (1) and (3).

    http://supportforums.BlackBerry.com/T5/Java-development/write-safe-initialization-code/Ta-p/444795

    I suspect you want to start and get a location at first upward, in which case you might find this useful:

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-background-application/Ta-p/445226

  • URGENT::opening multiple files - i have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    bbmChatDB of public database;

    public static FileConnection fconnRead = null;
    public static String fileReadData = "";
    public static InputStream is = null;
    data Byte [] = null;
    DataInputStream is = null;

    Here is my code...

    I have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    try {}

    FileConnection fc = Connector.open("file:///store/home/user/documents/BSM/") (FileConnection); "

    If (fc.exists ()) {}

    Enumeration e = fc.list ();

    While (e.hasMoreElements ()) {}

    System.out.println ("files are:" + (String) e.nextElement ());

    play this file
    StringBuffer stringBuff = new StringBuffer();
    try {}
    System.out.println ("opening file")-;
    System.out.println ("file name is:" + (String) e.nextElement ());
    fconnRead = Connector.open("file:///store/home/user/documents/BSM/(String)e.nextElement(),Connector.READ_WRITE) (FileConnection);
    System.out.println ("data length")-;
    If (fconnRead.exists ()) {}
    is = fconnRead.openDataInputStream ();
    data = IOUtilities.streamToBytes (is);
    Ddd = new String string (data);
    fileReadData = ddd.toString ();
    System.out.println ("length of data:" + fileReadData.length ());
    System.out.println ("read data :" + fileReadData);

    }

    } catch (IOException ee) {}
    ee.printStackTrace ();
    System.out.println ("Exception in the read data :")
    + ee.getMessage ());
    }

    }
    }

    } catch (IOException e) {}

    e.printStackTrace ();
    }

    {Finally

    try {}
    If (is! = null) {}
    is. Close();
    }
    System.out.println ("is closed...");
    } catch (IOException e1) {}

    E1. PrintStackTrace();
    }

    If (fconnRead! = null) {}
    try {}
    fconnRead.close ();
    } catch (Exception e) {}
    System.out.println (try ());
    }

    }

    }

    You can recode this treatment so that it uses only:

    e.nextElement ())

    Once a loop iteration.

    Directly at the start saying something like:

    String fileName = e.nextElement ());

    and use fileName everywhere in your loop.

    Also be aware that printStackTrace() will do nothing in your situation, it only works if you catch Throwable.  So make sure you something output all your catches exception and also have a catch (Throwable t) to catch the things you miss, as follows:

    {} catch (Throwable t)

    t.printStackTrace ();

    System.out.println ("Eception exception:" + t.toString ());

    }

    I think your code is thrown an exception and you don't see it.

  • Need help with this code to update the user interface example

    I'm triying to understand the differences between the three methods to manage UI interactions.
    I'm really confused with these three terms when triying them figure out in a real case.
    Basically, I know that I should use invokeLater, invokeAndWat, or getEventLock() to avoid
    This exception: java.lang.illegalStateException: engine access UI without holding the lock on the event

    The code below illustrates the function of the invokeAndWait method, but if I replace it with
    invokeLater or getEventLock() the program will work exactly the same way.
    Could you please change the code to show the differences between the three
    methods of updating the user interface?

    / public final class HelloWorldMainScreen extends form {}

    private LabelField labelField;
    public HelloWorldMainScreen() {}
    labelField = new LabelField ("Hello World");
    Add (labelField);
    Thread MainScreenUpdaterThread = new MainScreenUpdaterThread (this);
    thread. Start();
    }

    {} public void appendLabelText (String text)
    labelField.setText(labelField.getText()+"\n"+text);
    }

    }

    SerializableAttribute public class MainScreenUpdaterThread extends Thread {}
    HelloWorldMainScreen screen;

    public MainScreenUpdaterThread (screen HelloWorldMainScreen) {}
    this.mainScreen = screen;
    }

    public void run() {}
    for (int i = 0; i)< 10;="" i++)="">
    try {}
    Thread.Sleep (5000);
    } catch (InterruptedException ex) {};
    UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}
    public void run() {}
    mainScreen.appendLabelText ("Update");
    }
    });

    }
    }
    }

    These three concepts are very confusing for a lot from people so all explanatory source code
    describing their functions will be highly useful for everyone, I think.

    Thanks in advance!

    With respect to the effect, there is no difference between methods.  The difference is the way in which the result is achieved.  So we can't change the code to show you the difference.

    As we are unable to demonstrate the difference, you have to do with an explanation.  To understand the explanation, you'll need to understand the thread of events, so if you have not already, please consider this:

    http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865

    If the three options are differentiated by the processing order:

    (a) invokeLater executes the update on the thread of events.  The transformation takes place at a later stage and the code which is in order after the invokeLater will actually run before the code within the invokeLater.

    (b) invokeAndWait also manages the update on the thread of events, which means that all other events that await on the thread of events will be run before this code.  But any code after the invokeAndWait will not be executed.

    (c) the synchronized option, like invokeAndWait, runs the update of the UI before moving on to the following code.  The difference is that the code to run on the event Thread is not executed before code in the synchronized block.

    If this is meaningless, so that probably does not matter too much.  in general, you should use invokeLater, except if you need to update the user interface occur in the order with your background processing.  If so, use invokeAndWait. It has synced are very few occasions where you must use the block, and it should be very small updates to the user interface and you should understand the implications this could have on the wire events.

  • cannot run this KeyListener on a real device

    I found a strange problem, I can't run this on my "BOLD" KeyListener function only if I deleted KeyListener.When I press "OP" of the option of the device, it is impossible to disseminate the next screen to view it.

    But it works well in the 9000,8900,8700 Simulator and perhaps others. I use JDE debug to attach my "BOLD" and get an exception of unknow error in statusbar of JDE. 'step 1' can be outprint on debug output.

    my code is as below:

    class op implements OptionsProvider {
        public op(){
        }
        public String getTitle() {
           return "Op";
        }
        public void populateMainScreen(MainScreen mainScreen) {
                   LabelField l1= new LabelField("label");
                   mainScreen.add(l1);
                   System.out.println("step 1");
                   mainScreen.addKeyListener(new KeyListener() {
    
                   public boolean keyChar(char key, int status, int time) {
                         return false;
                   }
                   public boolean keyDown(int keycode, int time) {
                         return false;
                   }
                   public boolean keyUp(int keycode, int time) {
                         return false;
                   }
                   public boolean keyRepeat(int keycode, int time) {
                         return false;
                   }
                   public boolean keyStatus(int keycode, int time) {
                         return false;
                   }
            });
        public void save() {
        }
    }
    

    Also the same code can be run except OptionsProvider.

    Y at - it combined a bug with the software?

    I use a similar approach to peter, only without button. My optionsproviderimpl code:

    xxx.showOptions ();
    UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    mainScreen.close ();
    }
    });

  • Run the code from the jar java fixed pitch

    Hello

    based on article

    https://supportforums.Cisco.com/document/98986/UCCX-quick-Java-recipes

    I copied the code of 1). and they changed a bit for my daysx24hours. The only type is, give the script a parameter (here the number of credit card and return the result of UCCX (perhaps the last type is missing).)

    The following code:

    ###############################################################################

    public class ClassCheckCC {}

    Public Shared Sub main (String [] args) {}
    TODO self-generating method stub
    String ccnumber = args [0];
    String ccnumber = "66666666666666666";
    int isValid = 99;
    isValid = verifyCC (ccnumber);
    System.out.println (IsValid);
    }
            
            
            
            
    private static int verifyCC (String ccnumber) {}
    int sum = 0;
    Boolean alternate = false;
    Boolean isValid = false;
    try {}
    int i = 0;
    for (I = ccnumber.length () - 1; i > = 0; i--) {}
    int n = Integer.parseInt (ccnumber.substring (i, i + 1));
    If {(acting)
    n = n * 2;
    If (n > 9) {}
    n = (% n 10) + 1;
    }
    }
    sum += n;
    Alternate =! alternate;
    }
    isValid = (sum %10 == 0);

    } catch (Exception e) {}

    Returns - 1;

    }

    return (isValid == true? 1: 0);
    }
    }

    ###############################################################################

    In Eclipse, I create a new java project named "CheckCreditCardNumber" and insert this code into the new project. The name of the new class is 'ClassCheckCC '. I created a "CheckCCNumber1.jar" executable jar file This will work as expected in a DOS window.
    I call it this way: java-jar CheckCCNumber1.jar 1234567890123456

    The number represents a credit card number.

    In my opinion, always ready to implement in UCCX.

    JAR file downloaded on UCCX (you can find it in an attachment here), moved to the right side (to the Classpath entries. selected :) Some service restarted. Do some tests to access the file and can be seen in UCCX Editor.

    Then, I created a new script file and inserted a defined step

    takes it place the following errors:

    But the result expected from the byte type (-1.0 or 1) java code. Shit, I declared the variable isValid as string occurs:

    We try to call java code:

    Next, the error message is different:

    Yes, here are my questions. What wrong? Where can I call this java code little success.

    I know, it s possible to run code without additional jar files. I am interested to implement more than java classes in a jar file for future needs, and this is a first step.

    Greetings Naatz Maic

    Hello

    UH... Let's get a few things right if you don't mind.

    Your class is valid, as you say, you tested with Eclipse, which is a fair way to go. You have two methods, 'main' and a private static "verifyCC" returning an int value. Good. Now, if I take a quick glance at your UCCX script I see some interesting things there. First, you create a new variable of type ClassCheckCC, with the name CheckCC and with null as default. Cool, that's like saying JRE of UCCX for "Hey, let's use a new variable of type ClassCheckCC", or more precisely:

    ClassCheckCC CheckCC = null;

    Alrighty. Then, you kind of try to value of isValid saying CheckCC (ccnumber). Why it's wrong: in Java, it does:

    isValid = CheckCC (ccnumber);

    You see already? The above code actually means:

    isValid = null (ccnumber); Not valid!

    CheckCC is null.

    Let's try a slightly different approach:

    public class CheckCC {}
    Public Shared Sub main (String [] args) {}
    System.out.println ("Move along, nothing to see here, call verifyCC (String s) instead. ');
    }
    public static int verifyCC (String ccnumber) {}
    int sum = 0;
    Boolean alternate = false;
    Boolean isValid = false;
    try {}
    int i = 0;
    for (I = ccnumber.length () - 1; i > = 0; i--) {}
    int n = Integer.parseInt (ccnumber.substring (i, i + 1));
    If {(acting)
    n = n * 2;
    If (n > 9) {}
    n = (% n 10) + 1;
    }
    }
    sum += n;
    Alternate =! alternate;
    }
    isValid = (sum %10 == 0);
    } catch (Exception e) {}
    Returns - 1;
    }
    return (isValid == true? 1: 0);
    }
    }

    You may have noticed that I made a few adjustments. I renamed ClassCheckCC to the simpler CheckCC, I changed the method of verifyCC to the public modifier. It's actually a great example of a utility class where you have not all instances, so we should let JDK code optimization.

    Using this approach, we don't need to create instances of the object - that they are unnecessary in this case. Simply call CheckCC.verifyCC (String aString) is quite sufficient. We can, as I will demonstrate, but then again, why should create us instances of the class each time a script is run.

    The following three constructs are valid (assuming that I have created the necessary variables: val, validCCNumber, and invalidCCNumber):

    Valid value = CheckCC.verifyCC (validCCNumber)

    Pure and simple. I simply call the static verifyCC method on the CheckCC class with a parameter.

    The valid value = {return CheckCC.verifyCC (invalidCCNumber) ;}

    I just padded the single line above with braces, creating a block of code, point comma and the return keyword became necessary.

    The valid value = {CheckCC instance = new CheckCC(); return instance.verifyCC (validCCNumber) ;}

    Now, it's quite redundant but functional example. I created an instance of the CheckCC class, named instance and then ran the method verifyCC on the newly created class instance. Once again, it is a situation when a developer is boring and has nothing better to do than to create instances of the class and sending them to the eternal bytefields.

    G.

    Here is a screenshot:

Maybe you are looking for

  • Mac OS x has been freezing since 2002

    Have had my mac pro since 2008 - 2009 snow leopard - never had a freeze until November when I was clean files and also add text to images with Photoshop CS3. I did al the things Apple and this help to say to do with changing the battery, reset pram -

  • HP 15 ac 650TU: hp 15 ac 650tu

    Hello I have a 15 HP ac 650 YOU mobile with system of operating back free. I want to install windows 8 or 10 in this regard, I have to reinstall the drivers also or just windows installation will work properly?

  • On Qosmio G35 FN - F12 function key does not work

    Hello I have a problem in my toshiba G35. When I press FN and F1 F2..., it does not work. ((While pressing the FN key, I see the yellow light)) Could someone help me, please?

  • Windows Media Player 12 loses library at each reboot of the PC

    WMP 12 loses the 'music' in the library after each reboot.  Often, I can get the music content by going to manage the library, by removing the file from WMP, wait 5 minutes, restart WMP, manage the library, add the folder.  But sometimes it refuses t

  • Upgrading RAM for laptop DELL INSPIRON 14R N4010.

    Hello everyone. Initially, my RAM in my computer PORTABLE DELL INSIPRON 14R N4010 is 2 GB of DDR3 memory. As the performance of my computer is very slow, I am now looking to upgrade my RAM. The original RAM with the laptop is 2 GB 1333 MHZ SODIMM DDR