Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. I am getting a following error when going through Core dump file.
  2.  
  3. Program terminated with signal 11, Segmentation fault.
  4. (no debugging symbols found).../shpepr2/OraD11/Oracle/920/lib/libclntsh.sl.9.0: No such file or directory.
  5. /shpepr2/OraD11/Oracle/920/lib/libtracepls9.sl: No such file or directory.
  6. (no debugging symbols found).../shpepr2/OraD11/Oracle/920/lib/libwtc9.sl: No such file or directory.
  7. (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
  8. (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...#0 0xc000000000271580 in strncpy+0x270 ()
  9. from /usr/lib/pa20_64/libc.2
  10. (gdb) backtrace
  11. #0 0xc000000000271580 in strncpy+0x270 () from /usr/lib/pa20_64/libc.2
  12. #1 0x4000000000004694 in loadVIN_Codes+0x4c4 ()
  13. #2 0x400000000000514c in processVIN+0x13c ()
  14. #3 0x40000000000061ec in processInputFile+0x22c ()
  15. #4 0x4000000000006850 in main+0x1d0 ()
  16.  
  17.  
  18. static void loadVIN_Codes(
  19. const char VIN[],
  20. int WERS_Codes,
  21. const tWERS_CodeInfo WERS_Code[],
  22. const char CSO[])
  23. {
  24. EXEC SQL BEGIN DECLARE SECTION;
  25. char SQLSTATE[6];
  26. const char *hVIN = VIN;
  27. const tWERS_CodeInfo *info;
  28. char hWERS_CODE[6];
  29. char VIN34[3];
  30. char hwers_plant[6];
  31. char hwers_drive[6];
  32. int steer_pos;
  33. char hmod_code[2];
  34. char steer_code[2];
  35. EXEC SQL END DECLARE SECTION;
  36.  
  37.  
  38. int i = 0;
  39. int DR_Found = FALSE;
  40. int APL_Found = TRUE;
  41. /* Checking the DR WERS Codes in the incoming file for a particular VIN */
  42. while(i < WERS_Codes) {
  43. if (strncmp(WERS_Code[i].code,"DR",2) == 0)
  44. {
  45.  
  46. DR_Found = TRUE;
  47. break;
  48. }
  49.  
  50. i++;
  51. }
  52.  
  53. if (VIN[10] != 'A' && VIN[3] =='L')
  54. {
  55.  
  56. strncpy(VIN34,&hVIN[3],2);
  57. VIN34[2]='';
  58.  
  59. APL_Found=FALSE;
  60. /* EXEC SQL WHENEVER NOT FOUND goto notFound;*/
  61.  
  62. EXEC SQL SELECT WERS_CODE into :hwers_plant
  63. from PIC_WERS_PLANT
  64. WHERE MODEL_VIN=:VIN34 and PLANT_VIN=:VIN[10];
  65.  
  66. if (strlen(hwers_plant) <= 1)
  67. {
  68. goto notFound;
  69. }
  70. /* EXEC SQL WHENEVER NOT FOUND goto notFound; */
  71. EXEC SQL INSERT INTO pic_msl_vin_wers (
  72. full_vin, opt_type, wers_code, date_add, user_add
  73. ) VALUES (
  74. :hVIN,'APL',:hwers_plant,SYSDATE, 'PICC'
  75. );
  76.  
  77. APL_Found=TRUE;
  78. }
  79.  
  80. /* If there is no DR WERS Code in the incoming file for the particular VIN and then insert the Drive WERS Code through SHPE */
  81.  
  82. if (!DR_Found)
  83. {
  84. strncpy(hmod_code, &hVIN[3],1);
  85. hmod_code[1]='';
  86.  
  87. EXEC SQL SELECT distinct(STEER_POS) into :steer_pos
  88. from PIC_WERS_DRIVE
  89. where Model_code=:hmod_code;
  90.  
  91. strncpy(steer_code,&hVIN[steer_pos-1],1);
  92.  
  93. EXEC SQL SELECT DRIVE_CODE into :hwers_drive
  94. from pic_wers_drive
  95. where model_code=:hmod_code
  96. and steer_trans_code=:steer_code;
  97.  
  98.  
  99.  
  100. if (strlen(hwers_drive) > 1)
  101. {
  102. EXEC SQL INSERT INTO pic_msl_vin_wers (
  103. full_vin, opt_type, wers_code, date_add, user_add
  104. ) VALUES (
  105. :hVIN,'DR',:hwers_drive,SYSDATE, 'PICC');
  106. DR_Found=TRUE;
  107.  
  108. logWarning("Drive WERS Code has been inserted through SHPE for the VIN: %s, CSO Number: %sn",VIN, CSO);
  109.  
  110. }
  111. else
  112. {
  113. DR_Found=FALSE;
  114. goto notFound;
  115. }
  116. }
  117.  
  118. for(i=0; i < WERS_Codes; i++) {
  119. info = &WERS_Code[i];
  120.  
  121.  
  122. EXEC SQL INSERT INTO pic_msl_vin_wers (
  123. full_vin, opt_type, wers_code, date_add, user_add
  124. ) VALUES (
  125. :hVIN, :info->optionType, :info->code, SYSDATE, 'PICC'
  126. );
  127. }
  128. notFound:
  129.  
  130. if (!APL_Found) logWarning("No Match found in the PIC_WERS_PLANT table for the VIN: %s CSO Number: %sn",VIN, CSO);
  131.  
  132. if (!DR_Found) logWarning("No Match found in the PIC_WERS_DRIVE for the VIN: %s CSO Number: %sn",VIN, CSO);
  133.  
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement