Korn Help

Hi, I'm new to Unix and trying to learn how to use the Korn Shell. If anyone can help me with setting this up it would be greatly appreciated.
So far I have set up OS X's terminal to default to ksh when starting up, and now I am trying to figure out how to set up my .profile . If I manually create a .profile in my home directory and put an alias in (alias a = ls -ltr) it doesn't recognize it at all. I'm not sure if it is different in OS X than in other unix implementations, but I'm having no luck.
Thank you for your time.

Nothing says you can't write ksh scripts, but use bash as your command line interface.
While I was writing ksh scripts, I was actually using tcsh as my command line shell. At the time, I felt tcsh had a friendlier user interface (for me). But in 2005, I switch to bash, as I could get the friendly command line interface and have all the scripting features I like in the ksh environment.
NOTE: Friendly is a relative term. To me tcsh and bash were friendlier, but you must keep in mind that I started with punch paper tape and 80 column punched cards as my original command interface. I spent years using the original Bourne shell which is extremely limited and not at all what is called a Bourne shell these days So your friendlyness mileage may vary.
But if you are going to stay with ksh, then you also need to know about .kshrc files. Generally when you login, your .profile will run, but if you drop into a sub-shell, then ONLY the environment variables will pass to the sub-shell. If you want those aliases in the sub-shell, you want to have them defined in a .kshrc file.
Some utilities allow you to drop into a sub-shell, for example gdb, vi/Vim, emacs, etc... I've also used software development environment where to enter a View, or Sandbox and this environment drops you into a sub-shell where you are allowed to check-out, modify, check-in, and submit file changes.
So put your export environment variables in your .profile and your aliases, PS1 command prompt, function() declarations in .kshrc
And speaking of function() declarations, an alias is fine for simple commands, but sometimes you want something more complex that maintains shell context, and for that you use functions()s.
fred()
...do something more complex that might set...
...shell local or environment variables the continue...
...to exist after returning from the function...
...or issue a "cd" command to change your current...
...working directory...
Now you would just invoke this function by specifying it name: fred as a command.
Things I put in a function. My vi command remembers the last file I edited, so if I use the vi command without arguments, it just uses the saved file name from the previous invocation. I save the previous command line arguments in a shell local variable.
I have a function that does simple math, and the answer is saved in a local variable. I can then invoke my math function and reference the previous answer without needing to manually type it in or do a copy and paste.
I have my own rather complex "cd" command that is implemented as a function. It has its own memory. Kind of like pushd and popd only implemented the way I like.
ksh function() can be very useful.

Similar Messages

  • How can i pass the Input value to the sql file in the korn shell ??

    Hi,
    How can i pass the Input value to the sql file in the korn shell ??
    I have to pass the 4 different values to the sql file and each time i pass the value it has to generate the txt file for that value like wise it has to generate the 4 files at each run.
    can any one help me out.
    Raja

    Can you please more elaberate., perhaps you should more elaberate.
    sqlplus is a program. you start it from the korn shell. when it's finished, processing control returns to the korn shell. the korn shell and sqlplus do not communicate back and forth.
    so "spool the output from .sql file to some txt file from k shell, while passing the input parameters to the sql file from korn shell" makes no sense.

  • Need Help With Shell Programming

    Hi, I need some guidance as to how to approach my project.
    I need to develop a shell to host an e-learning environment that can be accessed through the internet. The user, preferably, needs not to download anything to run/start the e-learning environment. This e-learning environment allows users/students to create a forum, create a chatroom, hand up projects, send mail, do surveys and tutorials online and these can be submitted to the teacher/marker and receive feedback and also view their grades and schedule. Eg, Blackboard http://www.blackboard.com/
    The problem is is that there seems to be no shell programming by using java. I have found only shell programming using UNIX, korn and C. I read other posts in the forums here concerning shell programming and alot of the codes include the first 2 lines :
    Runtime rt = Runtime.getRuntime();      
    String command = "your_shell_script_command";      
    try {           
          Process process = rt.exec(command);           
         from = new BufferedReader(new InputStreamReader(process.getInputStream()));           
         to = new PrintWriter(process.getOutputStream(), true);      
    catch (IOException e) {         ...       }the above codes were taken from this post: http://forum.java.sun.com/thread.jsp?forum=57&thread=352231
    Does it means that I need to use another language besides Java to program a shell and then run it together with my java program? If so, what language do I need to learn and what Java "component" do I need to use? and is it possible to run a shell in an applet, since the applet is viewable through a browser?
    I really need some help on this problem as I don't have a clue to go about it at all. Thanks in advance.

    er, actually the applet does not seem to load at all.
    But from what you have written, yeah, I need to
    process the user's input and in my case, his
    selected/choosen options in a menu.
    E.g, the user wants to create a forum, he/she chooses
    the create forum option from the menu which is part of
    the shell and something happens which allows the user
    to customise the forum.
    So, let me get this straight, I can create an applet
    and run the shell on the applet and the user can view
    this application without downloading anything? As YAT said...providing they have the java plugin...yes... if you keep it to java.applet.Applet (AWT) and not JApplet, you should even have more users able to run it without 'downloading' anything..
    Now..to be clear... they ARE downloading your .class files, and running them within a JVM on their own local machine... But they will not need anything (assuming their browser supports the Java version you write in) else...

  • Help in installing Oracle Xe in suse 10.2

    I have successfully installed Oracle XE in suse linux 10.2.(my laptop)
    The place I had installed had a Lan network available.
    Now I usually work in a location where there is no network.
    after I get the message that oracle XE is succesfully installed, I tried to open the oracle home page, but i was getting an error, that there is no network,
    I followed the instructions to give no proxies for my oracle home page address, etc.but to no avail.
    Can someone help me in this.
    Do reply to [email protected] incase you need more information, or reply to this thread.

    Ok..
    This is not a network issue at all..
    I am unable to connect to oracle even though there is network..
    I was wrong.
    Now here is the scenario..
    I downloaded the rpm for oracle XE
    i ran this command
    rpm -ivh downloads/oracle-xe-univ-10.2.0.1-1.0.i386.rpm
    then i ran the command for configuring
    $ /etc/init.d/oracle-xe configure
    gave the default settings
    then I went to
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
    and from there ran the script file
    . ./oracle_env.sh
    the instruction says....
    You may also want edit your login or profile files so that these environment variables are set properly each time you log in or open a new shell.
    For Bourne, Bash, or Korn shell, enter the following line into the .bash_profile (to log in) or .bashrc file (to open a new shell):
    . /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
    For C or tcsh shell, enter the following line into the .login file (to log in) or .cshrc file (to open a new shell):
    source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.csh
    Where do I find the .bash_profile file in suse 10.2?
    is this the final step to start working on my database...?
    has anyone worked on this before?
    It also says...
    You can find the database creation logs in $ORACLE_HOME/config/log/*.
    I cant find this path in my system...
    Someone help me..

  • Example of Unix Korn Shell to run .scr (similar to NT .bat)??

    Wondering if anyone has an example of a Korn shell script that they use in Unixto run the Essbase script (.scr) to load up an outline.I am using NT .bat and will do the same in Unix. I will be so gratefull.Please email me [email protected]! Karim

    Hi,
    I have an application (very small) that connects to
    our database. It needs to run in our UNIX environment
    so I've been working on a shell script to set the
    class path and call the JAR file.
    #!/bin/sh
    exec /your/path/to/java -cp your:class:paths:here -MoreJvmOptionsHere your.package.and.YourClass "$@"Store this is a file of any name, e.g. yuckiduck, and then change the persmissions to executechmod a+x yuckiduckThe exec makes sure the shell used to run the script does not hang around until that java program finishes. While this is only a minor thing, it is nevertheless infinite waste, because it does use some resources but the return on that investment is 0.
    CFG_DIR="`dirname $0`"You would like to fetch the directory of the installation out of $0. This breaks as soon as someone makes a (soft) link in some other directory to this script and calls it by its soft linked name. Your best bet if you don't know a lot of script programming is to hardcode CFG_DIR.
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIRVery bad technique in UNIX. UNIX supports the notion of a "current directory". If your user calls this program in a certain directory, you should assume that (s)he does this on purpose. Making your application dependent on a start in a certain directory ignores the very helpful concept of 'current directory' and is therefore a bug.
    cd $OLDDIRThis has no effect at all because it only affects the next two lines of code and nothing else. These two lines, however, don't depend on the current directory. In particular this (as the cd above) does not change the current directory for the interactive shell your user is working in.
    echo $EXIT_STATUS
    exit $EXIT_STATUSEchoing the exit status is an interesting idea, but if you don't do this for a very specific purpose, I recommend not to do this for the simple reason that no other UNIX program does it.
    Harald.

  • Help to install oracle XE in suse linux 10.2

    I have suse 10.2 installed in my laptop.
    I downloaded the rpm for oracle XE and installed it by logging on as root
    I ran the configuration to give 8080 as port etc.
    Then i ran the ./.bash_profile script.
    I am unable to login to sqlplus home page.
    I am in a fix , as I seem to be missing something.
    Using K menu/application and from there(graphical) when i say start database,
    i get the message
    Operation failed, root is not a member of 'dba' group.
    I cant make sense out of this.
    Can someone help me out.
    if u need more info, do email me on [email protected]
    or reply to this thread.

    I have a Hp DV6000z laptop with the following config
    AMD turion TL56 1.8GHz
    2GB DDR ram
    Nvidia Geforce Go7200 (256 MB)
    a/b/g wireless with bluetooth
    built in webcam
    I had vista pre configured in my laptop.
    I used Vista Boot pro to resize the partition.
    I allocated 40GB hdd space for linux.
    I installed Suse 10.2 and the OS works fine.
    I wanted to install Oracle XE (Oracle 10g express edition) in my suse linux.
    I was able to install Oracle XE in my vista, and it runs good.
    #############I follwed the steps to install the rpm for oracle XE###
    I logged in as root.
    I downloaded the rpm for oracle XE from oracle website
    i ran this command
    rpm -ivh downloads/oracle-xe-univ-10.2.0.1-1.0.i386.rpm
    then i ran the command for configuring
    $ /etc/init.d/oracle-xe configure
    gave the default settings(i.e port 8080 , password etc..
    then I went to
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
    and from there ran the script file
    . ./oracle_env.sh
    the instruction says....
    You may also want edit your login or profile files so that these environment variables are set properly each time you log in or open a new shell.
    For Bourne, Bash, or Korn shell, enter the following line into the .bash_profile (to log in) or .bashrc file (to open a new shell):
    . /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
    For C or tcsh shell, enter the following line into the .login file (to log in) or .cshrc file (to open a new shell):
    source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.csh
    Where do I find the .bash_profile file in suse 10.2?
    is this the final step to start working on my database...?
    has anyone worked on this before?
    ****************************************8
    I found .bashrc in the home folder of the user vikram. I did not find .bash_profile
    I added the line in the .bashrc file.
    I also added root and vikram as members of dba group
    When i run sqlplus and give username SYSTEM and password what I set.
    I get the error message
    oracleXE: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
    ERROR:
    ORA-12547: TNS:lost contact
    the isqlplus webpage is not getting displayed either.
    I dont seem to understand the problem.
    further in instruction...
    It also says...
    You can find the database creation logs in $ORACLE_HOME/config/log/*.
    I cant find this path in my system...
    Using K menu/application and from there(graphical) when i say start database,
    i get the message
    Operation failed, root is not a member of 'dba' group.
    I am unable to see the webpage for sqlplus, nor am i able to log in to sqlplus with sys or system as user name and password i provided
    Has some one installed oracle, please tell me what I am missing.
    email [email protected], or reply to thread, to help me out.
    I am unable to de install oracle.
    Can someone tell me how to do that as well.
    I also need help in this regard.
    I want to install graphics drivers for nvidia Geforce go7200.
    please give steps to do so.
    I want to install drivers/able to use my wireless card.
    a/b/g wireless
    I want to install drivers for my webcam.
    Can someone tell me the fixes for my problems!!!
    thanks in advance

  • Korn shell script

    Hi,
    I have created korn shell script whoch takes records and spool into file as every column is ~ seperated. At the last I have to show total count as this one
    '[EOF <<count>>]' It is displaying but '[EOF' at one line and then ACTUAL COUNT value at next line.code is like this
    cnt variable in this I already take as count from query. Can anybody helps me?
    CREATEOUTPUT=`sqlplus -s $DATABASE@$ORACLE_SID <<SQLSCRIPT
         set heading off;
            set feedback off;
         set echo on;
         set verify off;
         set linesize 150;
         set pagesize 0;
         spool $filename
         /* 1.0 version developer needs to be change this with every relase*/
            SELECT '$BILL_SYSTEM'||' '||to_char(gnvgen.systemdate,'DD/MM/YYYY HH:MI:SS')||' '||'1.0' from dual;
         SELECT b.account_num ||'~'||
                        FROM pvaccount12 b,pvcustomer7 c,PROVIDER d,pvcustomertype2 e,pvbillsummary13 f
         WHERE b.customer_ref=c.customer_ref
         AND c.PROVIDER_ID= d.PROVIDER_ID  
         AND c.customer_type_id = e.CUSTOMER_TYPE_ID
         AND f.account_num =  b.account_num
         AND F.OUTSTANDING_DEBT_MNY <>0
         AND b.invoicing_co_id=3
         AND trunc(f.bill_dtm) <= trunc(gnvgen.systemdate)
         ORDER BY b.account_num;
         SELECT '[EOF'||'$cnt'||']' FROM dual;
         spool off;
         exit
         SQLSCRIPT
         `

    How did you set cnt variable ?

  • Help with Solaris.....any help would be nice

    I have to write a paper comparing and contrasting Solaris with DOS/MSDOS.....you wouldnt think this would be hard but it is......is ththere a place where I can find a head to head comparsion? If not perhaps some of you familiar with Solaris could give me some points to start with......I should point out I have never used or seen Solaris I am completely new to this area and it may seem simple but the truth is Im a little overwhelmed by all the information....cant see the forrest for the trees...........so any help would be nice ....thanks in advance

    Hi,
    Solaris is so much more advanced an OS than DOS that a comparison is not straightforward, but here are some less than exhaustive suggestions. Please bear in mind I m not a DOS person, and these are just my personal thoughts on the subject; apologies to Microsoft afficionados for any mistakes.
    Similarities:
    Both DOS and Solaris are Operating Systems. They provide access to machine resources, like a printer port, or a disk ( through the filesystem), by providing an Application Programming Interface, thus saving programmers from learning the underlying details and machine language of each machine they use. So for example in DOS compiler routines make use of INT 21h to access system services.In solaris we use the system call interface (which does a similar thing underneath).
    They also both provide a command shell for ordinary users. In DOS we have command.com, in Solaris you may use Korn shells for example.
    Differences
    DOS is a single user operating system. Solaris is multiuser, multitasking and multiprocessing.
    That is to say Solaris supports multiple programs running on the system at the same time. It will context switch between them to give the illusion of concurrency on a uniprocessor system (time-slicing). On a multiprocessor some tasks will run concurrently.
    Many users can log on to a Solaris system (via a serial terminals, or a network connection (telnet or X windows)) and run programs at the same time. Full networking facilities are built in.
    Dos only provides the ability to fileshare across the network, using the add on Lan Manager.
    Because multiple users run processes (threads/tasks ...) concurrently, Solaris provides extensive security, which DOS doesnt. Each process is owned by a user and runs in its own virtual memory space and is prevented from interfering with any other process memory or other users processes. The operating system and its data is held in protected kernel memory and not directly accessible to processes, so malfunctioning user program cant crash the system accidentally or maliciously.
    Devices and files are protected through filesystem permissions, so a device or file has an owner, a group owner and various permissions attributes such as read/write/execute.
    Solaris also implements filesystem Access Control Lists (ACLs).
    Solaris runs in 32bit protected mode on x86 processors, giving it access to the full address range of the processor (4GB using 4k pages). DOS uses the 16bit segmented memory model.
    On ultrasparc systems or the forthcoming Intel Itanium systems, Solaris runs in 64bit mode, giving it access to vastly more memory and
    faster computation. (note also DOS only runs on x86 processors).
    Who are you writing the paper for? It would probably help some of the readers here with posting suggestions. Some specific questions would be good too.
    However, you should try to get access to a solaris system on a network and maybe have a friendly sysadmin show you around a bit.
    Do you know anyone with a LINUX system? Solaris and LINUX are variants of the UNIX OS and for your purposes a comparison of LINUX and DOS may suffice.
    Hope that is some help.
    Ralph
    SUN DTS

  • HELP iTunes is messing up my music

    for some reason, iTunes changes the song length of all my music and either cuts the song off or makes it super long, like a 5 minute song says its 24 minutes. And when i download it to my ipod it is cuttin off songs and others say they are longer than they are whats goin on?? i tried uninstallin iTunes and reinstalling but it didnt work, and the song files saved on my computer say the right lenght and are completely fine on any other media player, but when it goes to iTunes it goes haywire!!
    please help

    I have a similar problem with iTunes 6.0.2.23
    Let's use Korn's 1:15 song, Dead. I double clicked one day to play it, and suddenly the song length changed to 17:15 minutes.
    It's fine when I play it, because it stops after 1:15 seconds. But for longer songs showing up at like, 0:50 seconds, they get cut off and that *****.
    Deleting them from iTunes and then putting them back in doesn't help.
    Suggestions, please?

  • (SQL*PLUS HELP) RUNNING PUPBLD OR HELPINS ASKS FOR SYSTEM_PASS

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-22
    (SQL*PLUS HELP) RUNNING PUPBLD OR HELPINS ASKS FOR SYSTEM_PASS
    ==============================================================
    PURPOSE
    이 내용은 SQL*Plus 상에서 SQL*Plus command의 help를 보기 위한 방법이다.
    Problem Description
    SQL*Plus command의 help를 보기 위해서 helpins를 수행하면
    SYSTEM_PASS is not set이라는 에러 메시지가 발생하는 경우가 있다.
    이 자료는 pupbld 또는 helpins를 수행하기 전에 SYSTEM_PASS 환경변수를
    셋팅하는 방법에 대한 자료이다.
    아래와 같은 에러가 발생하는 경우 조치 방법에 대해 알아본다.
    SYSTEM_PASS not set.
    Set and export SYSTEM_PASS, then restart help (for helpins or
    profile for pupbld) installation.
    Workaround
    none
    Solution Description
    이 스크립트는 system user로 database에 connect되어 수행되어야 한다.
    helpins를 수행하기 위해서는 SYSTEM_PASS 환경변수가 셋팅되어 있어야 한다.
    NOTE
    For security reasons, do not set this variable in your shell
    startup scripts. (i.e. .login or .profile.).
    Set this environment variable at the prompt.
    1. Prompt에서 환경변수를 셋팅하기
    For C shell:
    % setenv SYSTEM_PASS system/<password>
    For Korn or Bourne shells:
    $ SYSTEM_PASS=system/<password> ;export SYSTEM_PASS
    2. Now run "$ORACLE_HOME/bin/pupbld" or "$ORACLE_HOME/bin/helpins".
    % cd $ORACLE_HOME/bin
    % pupbld
    or
    % helpins
    주의사항
    $ORACLE_HOME/bin/pupbld 스크립트와 $ORACLE_HOME/bin/helpins 스크
    립트를 수행하기 위해서는 반드시 SYSTEM_PASS 환경변수를 필요로 한다.
    Reference Document
    <Note:1037075.6>

    check it please whether it is a database version or just you are installing a client. Install Enterprize database on 2k system. I you are running a client software then you are to deinstall it.

  • Windows connect to unix kick off korn shell - can it be done?

    We are running CF7 on windows, but I need to be able to read
    and kick off a korn shell job that is sitting on a unix box. I've
    looked at both cfdirectory and cffile, but I'm at a loss if I can
    do this. Does anyone know the steps I need to do this? Is it
    possible? Any help would be great.
    thanks,
    bj

    ugly vs elegant
    I'm a newbie so you'll get the ugly.
    1) Have unix poll a directory
    2) Have CF drop a file in that directory
    3) Have unix run korn shell if file exists
    Good luck!

  • Oracle 10g and Korn Shell Scripting

    I have a table,SALES_STAGING, with 3 main columns.
    Sales_Date, Sales_type,Sales_Code.
    A sale is added to the table then waits until approved to be processed. The Sales_Code is 1(waiting approval). Then manually changed to 2 every 30 minutes by sales staff except on weekends. By Monday,a large queue develops. This must be changed because the queue is slowing the system. Can someone help create a Unix Korn shell script to
    1) Run every 30 minutes via Crontab
    2)login to the Oracle DB.
    3)Count the number of records to be processed, if any.
    4)Update another 'log' table with the time it ran and the records to be processed
    5)if there are less than 20 add another 50 to be processed by changing the Sales_Code from 1 to 2.
    This would really help out tremendously! Thank you.

    Wait... Isn't this forum designed for the sharing of information? The experts here shouldn't be concerned whether the request is from a Student, Oracle newbie or Developer and should focus on the request. If you are capable of assisting then I am hoping you will out of the core respect for professionalism and the motivation to provide something of value to others. If not, don't waste my time or any one else by responding with preconceived judgments and insulting remarks as these will be reported.
    Sales transactions can peak at 20,000 per hour with an average of several million thru the week. Those sales by VIP customers are immediately identified and have a priority for approvals because their balances can easily exceed $1,000,000.00. There is a pre-approval process to be introduced but until programs can be modified/tested and deployed we need a quick fix. The programming system isn't slow, it's the limited human resources approving VIP customers. My request was to keep it simple and expand on it myself to include the entire scope of our project. dbms_scheduler, although a good idea will require DBA assistance and there is no resource available. I need a simple working model to give me some direction/ideas...

  • Help with Install of Xerces-c 2.4.0 for Solaris

    After having memory leak issues with Xerces-c 2.3.0 for Solaris 2.7
    for CC 6.2 I have decided to update to at least 2.4. I have
    downloaded the binary tarball and have installed it on my development
    server, which runs Solaris 2.8. I do use CC 6.2 for my compiler. I
    have reset all the environment variables in Korn shell that point to
    the Xerces distribution.
    When I try to compile the same piece of code that compiles fine under
    Xerces 2.3 the compiler spits back the following errors compiling
    against 2.4 regarding the XSerializeEngine.hpp :
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 541: Warning: Too many arguments in macro Assert.
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 541: Error: No direct declarator preceding "(".
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 541: Error: Use ";" to terminate declarations.
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 546: Error: Use ";" to terminate declarations.
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 652: Warning: Too many arguments in macro Assert.
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 657: Warning: Too many arguments in macro Assert.
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 663: Warning: Too many arguments in macro Assert.
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 663: Error: No direct declarator preceding "(".
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 664: Error: A declaration does not specify a tag or an
    identifier.
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 664: Error: Use ";" to terminate declarations.
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 664: Error: A declaration was expected instead of "{".
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 665: Error: No direct declarator preceding "(".
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 667: Error: "," expected instead of ")".
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 670: Error: A declaration was expected instead of "}".
    "/opt/local/software/xerces/xerces-c2_4_0-solaris_27-cc_62/include/xercesc/internal/XSerializeEngine.hpp",
    line 702: Error: A declaration was expected instead of "}".
    11 Error(s) and 4 Warning(s) detected.
    gnu_make: *** [SchedUpdateSubscriber] Error 11
    Any ideas on what I am doing wrong?
    Thanks in advance.

    I've always compiled xerces from the source code. Have used 2.4.0 and 2.5.0 this way with Sun One Studio 8 without any issues.
    If you want to try compiling, I'd recommend going with the later release (more compiler tweaks and fixes) and the following build commands:-
    % cd xerces-c-src_2_5_0
    % export XERCESCROOT=`pwd`
    % cd src/xercesc
    % runConfigure -r pthread -p solaris
    % export CXXFLAGS="-library=stlport4" - skip this line if you're not using stlport
    % ./configure
    % gmake
    Hope that helps!

  • Problem with threads and simulation: please help

    please help me figure this out..
    i have something like this:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DrawShapes extends JApplet{
         private JButton choices[];
         private String names[]={"line", "square", "oval"};
         private JPanel buttonPanel;
         private DrawPanel drawingArea;
         private int width=300, height=200;
         public void init(){
              drawingArea=new DrawPanel(width, height);
              choices=new JButton[names.length];
              buttonPanel=new JPanel();
              buttonPanel.setLayout(new GridLayout(1, choices.length));
              ButtonHandler handler=new ButtonHandler();
              for(int i=0; i<choices.length; i++){
                   choices=new JButton(names[i]);
                   buttonPanel.add(choices[i]);
                   choices[i].addActionListener(handler);
              Container c=getContentPane();
              c.add(buttonPanel, BorderLayout.NORTH);
              c.add(drawingArea, BorderLayout.CENTER);
         }//end init
         public void setWidth(int w){
              width=(w>=0 ? w : 300);
         public void setHeight(int h){
              height=(h>=0 ? h : 200);
         /*public static void main(String args[]){
              int width, height;
              if(args.length!=2){
                   height=200; width=300;
              else{
                        width=Integer.parseInt(args[0]);
                        height=Integer.parseInt(args[1]);
              JFrame appWindow=new JFrame("An applet running as an application");
              appWindow.addWindowListener(
                   new WindowAdapter(){
                        public void windowClosing(WindowEvent e){
                             System.exit(0);
              DrawShapes appObj=new DrawShapes();
              appObj.setWidth(width);
              appObj.setHeight(height);
              appObj.init();          
              appObj.start();
              appWindow.getContentPane().add(appObj);
              appWindow.setSize(width, height);
              appWindow.show();
         }//end main*/
         private class ButtonHandler implements ActionListener{
              public void actionPerformed(ActionEvent e){
                   for(int i=0; i<choices.length; i++){
                        if(e.getSource()==choices[i]){
                             drawingArea.setCurrentChoice(i);
                             break;
    }//end class DrawShapes
    class DrawPanel extends JPanel{
         private int currentChoice=-1;
         private int width=100, height=100;
         public DrawPanel(int w, int h){
              width=(w>=0 ? w : 100);
              height=(h>=0 ? h : 100);
         public void paintComponent(Graphics g){
              super.paintComponent(g);
              switch(currentChoice){
                   case 0:     g.drawLine(randomX(), randomY(), randomX(), randomY());
                             break;
                   case 1: g.drawRect(randomX(), randomY(), randomX(), randomY());
                             break;
                   case 2: g.drawOval(randomX(), randomY(), randomX(), randomY());
                             break;
         public void setCurrentChoice(int c){
              currentChoice=c;
              repaint();          
         private int randomX(){
              return (int) (Math.random()*width);
         private int randomY(){
              return (int) (Math.random()*height);
    }//end class drawPanel
    That one's from a book. I used that code to start with my applet. Mine calls different merthod from the switch cases. Say I have:
    case 0: drawStart(g); break;
    public void drawStart(Graphics g){
      /* something here */
    drawMain(g);
    public void drawMain(graphics g){
    g.drawString("test", x, y);
    //here's where i'm trying to pause
    //i've tried placing Thread.sleep between these lines
    g.drawLine(x, y, a, b);
    //Thread.sleep here
    g.drawRect(x, y, 50, 70);
    }I also need to put delays between method calls but I need to synchronize them. Am I doing it all wrong? The application pauses or sleeps but afterwards, it still drew everything all at once. Thanks a lot!

    It is. Sorry about that. Just answer any if you want to. I'd appreciate your help. Sorry again if it caused you anything or whatever. .n_n.

  • Query Help

    Table1:
    ou store point
    LS LIB1 50
    LS LIB1 200
    LS LIB1 100
    LS LIB1 79
    I have to insert table1 to table2 by splitting into every 143point and assing serial number for every 143 from parameter.
    in aboce example we can split 3 time 143 like below table2 sample.
    Table2
    ou store point serial_number
    LS LIB1 50 101
    LS LIB1 93 101
    LS LIB1 107 102
    LS LIB1 36 102
    LS LIB1 64 103
    LS LIB1 79 103
    i tried below procedure its not working.
    table may have any order like below.
    Table1:
    ou store point
    LS LIB1 200
    LS LIB1 50
    LS LIB1 100
    LS LIB1 79
    then table2
    ou store point serial_number
    LS LIB1 143 101
    LS LIB1 57 102
    LS LIB1 50 102
    LS LIB1 36 102
    LS LIB1 64 103
    LS LIB1 79 103
    create or replace procedure assign_serial(from_num number,to_num number) is
    bal number(10);
    begin
    bal := 0;
    for c1 in(select * from table1)
    loop
    if c1.point <=143 then
    if bal=0 then
    bal=143-used;
    insert int0 table2 values(c1.ou,c1.store,used);
    elsif used > 0 then
    used=used-bal;
    insert int0 table2 values(c1.ou,c1.store,bal);
    bal=0;
    if used > 0 then
    insert int0 table2 values(c1.ou,c1.store,used);
    end if;
    bal:=143-used;
    end if;
    end loop;
    end;
    How to split and assign serial number,please hELP.

    .after giving serial num i have to change points in table1 to 0.The problem for SUm and split for every 143 is ,different OU and store is there.we have to know for which store points we earned serial number.
    i hope this below logic little satisfy except assign cardnum,please........ check and currect the logic
    LS LIB1 50
    LS LIB1 200
    LS LIB1 100
    LS LIB1 79
    --variable used and bal
    for c1 in(select * from table1)
    loop
    used := c1.points;
    if c1.point <=143 then
    if bal=0 then
    bal=143-used;
    insert int0 table2 values(c1.ou,c1.store,used);
    elsif used > 0 then
    used=used-bal;
    insert int0 table2 values(c1.ou,c1.store,bal);
    bal=0;
    if used > 0 then
    insert int0 table2 values(c1.ou,c1.store,used);
    end if;
    bal:=143-used;
    end if;
    end loop;

Maybe you are looking for

  • Collections - Delete Entry Throws Error

    I'm using four collections on a form. When the user updates the form by selecting the "blank" at the top of the select list one entry in one of the collections, the user gets an integrity constraint error - parent key not found. The collection uses a

  • Crashes after effects with warp stabilizer

    I have some problems with after effect cs6. When I try to warp stabilizer an mov file  in after effects I have crashes every time. My Pc runs Win 7 Ultimate 12 G Ram memory Graphic card NVidia GTX 480 In the preferences I have no GPU accelleration it

  • ORACLE ADF 11g /JSF TO  serviet (Service method) not invoking

    Hi, ORACLE ADF 11g /JSF TO serviet (Service method) not invoking My project name is : ComplProject inside the project im having 1 jsp say x.jsp work environment : (oracleADF 11g) jdev11 and weblogic server 10.3 in x.jsp im displaying 1 go link -> whe

  • Formula Column in Matrix Report (Running Balance)

    Hi all. I hope somebody can help me. I am working on a matrix report using multi-query data models. The report has 2 groups in the horizontal axis and 3 groups in the vertical axis. The intersection is not just a single row but may consist of multipl

  • Isnumeric function is giving wrong output

    please check the code below. before converting I am validating the value is isnumeric or not. The Logic is giving isnumeric = 1 and when i am trying to convert to numeric it is giving me the error. declare @CustPhone varchar(max) set @CustPhone = '30