Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. SkiLift

    sed replace with spaces in line

    Try this: $SED "s/${START_AC}/${DEST_AC}/g" $ALEPH_START > $ALEPH_START_TEMP
  2. SkiLift

    memcmp versus strcmp, why is memcmp faster?

    You're right about unrolling it yourself! My bad about memcmp and structs...I actually do know better than that :)
  3. SkiLift

    memcmp versus strcmp, why is memcmp faster?

    memcmp(str1, "Z", 2) is a great idea to get rid of the strlen, but is harder to read or understand what's going on and why (for maintainability). I like the strcmp because of the readability. I would use the memcmp if I did not have to add either the strlen or the memcmp(str1, "Z", 2) trick...
  4. SkiLift

    memcmp versus strcmp, why is memcmp faster?

    Ooops...missing a open paren before the first strcmp in the first code block.
  5. SkiLift

    memcmp versus strcmp, why is memcmp faster?

    During a code review, I was told to change my strcmp to a memcmp, because strcmp is too expensive. I'm pretty sure he is correct, but I was wondering why. The loop gets moderate use. Here is the old code: if (!(lWordIndex == 0 && strcmp(str1, "Z") == 0 || strcmp(str1, "X") ==...
  6. SkiLift

    memcmp versus strcmp, why is memcmp faster?

    Why is memcmp faster than strcmp?
  7. SkiLift

    Need String filtration help.

    The 'cut' command is underrated: echo "cRanjan_abc_xyz@foo.com" | cut -d\@ -f1
  8. SkiLift

    CRTSQLCI - precompile error on SQL CONNECT

    Does anyone know why the code below compiles ok on v4r2 but does not compile on v5r1? The error msg is below the code. It seems to require a USING clause now, when before it did not. BTW, the last else stmt passes compile, ie, you can connect without a user or pw, so the security reason does...
  9. SkiLift

    Command to display all references of executable file?

    I seem to remember a Unix command that has an executable file as its one argument. The command displays all the references of the executable, for example: globol variables, function calls, etc... Does anyone know of such a command? It is similar to 'ldd'.
  10. SkiLift

    text file edit - multiple lines to one line

    Here is another way using a shell script #!/bin/bash if [ "$#" -ne 1 ] ; then echo "USAGE: $0 file" exit 9 fi MASK=$(grep "ipNetmask" "$1") if [ "$?" -ne 0 ] ; then echo "In file does not have ipNetmask" exit 1 fi WORK=$(grep "ipNetwork" "$1") if [ "$?" -ne 0 ] ; then echo "In file...
  11. SkiLift

    Will hpux 11.11 build run on 11.0?

    Does anyone know if I compile and link on hpux 11.11 and copy the program to hpux 11.0, is it guaranteed to work?
  12. SkiLift

    TruUnix 5.1 - binaries 32 or 64 bit

    I understand that TruUnix5.1 is a true 64 bit machine. On other machines, like solaris 8 and Aix 5.1, I can compile and link in 32 bit or 64 bit mode. I can use the "file" command to see if binaries are 32 or 64 bit. For Ex: $ file lib/libsqlplus.so lib/libsqlplus.so: ELF 64-bit MSB...
  13. SkiLift

    compiler and pointer addition...

    Add the typecast to target (see boldface below), it will work. target=datastore.Orbit->Epoch; target= (DS_GEP_Epoch)target + (v->epoch_number)*(sizeof(DS_GEP_Epoch)); temporary=datastore.Orbit->Epoch + ((v->epoch_number)*(sizeof(DS_GEP_Epoch)));
  14. SkiLift

    compiler and pointer addition...

    Yes, I tried a simple test with 'target' as a void ptr and it leterally adds one, see first listing. Then I tried it with type casting 'target' to an int and it worked, see listing 2. /* listing 1 ---------------------------*/ #include <stdio.h> void *target=NULL; int *myint=NULL; int...
  15. SkiLift

    compiler and pointer addition...

    My guess is that if you change target to be of type DS_GEP_Epoch, then it will work. I base this on the rules of pointer arithmetic, like adding one to a char ptr adds sizeof(char) to the address; but adding one to a int ptr adds sizeof(int) to the address. I'm not sure what is added to a ptr...
  16. SkiLift

    What is Client Access ODBC Driver ?

    Client Access ODBC Driver allows you to connect to your DB2 database from your PC. For example, you can write your own software that connects to it, or you can connect to it and import DB2 tables into MS EXCEL and ACCESS. Open Excel help and type in 'odbc'. I dont know what DB2Connect is. If...
  17. SkiLift

    How do I get SQL output to a file on AS400?

    I tried going into strsql and doing F13. From there I select 1, change session attributes. Then, I select output to file... I do a select statement and the output goes to the file. The problem is, I dont get column names and the numeric data is garbage (being print as chars) How do I get...
  18. SkiLift

    is OS400 5.2 = iSeries 5.2 ??

    Aix and OS/400 are two different operating systems. 5.2 is the latest version (i think) of Aix and it is a flavor of Unix. V5R2 is the latest release of the OS/400 that we have. I think it's a coincidence that they both have a 5 and a 2 in the version. IBM owns both of them. The OS/400 runs...
  19. SkiLift

    AS400 - new C file - getting Definition not found for symbol 'xyz'

    I am trying to add a new C source file to a program. I also changed an existing source file to call functions in the new source file. All source files compile OK. The link (actually CRTSRVPGM) is complaining that: Definition not found for symbol 'xyz' It appears to me that CRTSVRPGM does...
  20. SkiLift

    getcwd() on AS400 / OS 400 / V5R1

    Looking for documentation on the getcwd() function on the AS400, specifically what header file needs to be included.

Part and Inventory Search

Back
Top