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: *

  • Users: lbzh
  • Order by date
  1. lbzh

    Teradata SQL help needed

    I have some data in a table and looks like the Input table below. I would like to write a Teradata SQL to inspect the sequential records represented in the Input. If the key which is composed of Ordernum, Name and Zip is duplicated, then keep one version of the key record with the earliest...
  2. lbzh

    Drill down in Excel

    Hi, We have some functionality in a pivot table in Excel where if you right click a pivot table data item, you can drill down on the cell and get the corresponding detail data from the Analysis Services cube. This is down via a drill down macro which resides in the Excel spreadsheet. This works...
  3. lbzh

    Drill Through from Analysis Services Cube

    Hi, We have some functionality in a pivot table in Excel where if you right click a pivot table data item, you can drill down on the cell and get the corresponding detail data from the Analysis Services cube. This is down via a drill down macro which resides in the Excel spreadsheet. This works...
  4. lbzh

    Pivot table question

    I am creating a pivot table based off a stored function in Excel. It returns Job codes instead of Job names to a data sheet in excel. Another tab has a pivot table which references this sheet. I want to convert the Job code into Job names (possibly using a formula) in the pivot table rather...
  5. lbzh

    Unload command

    I have some questions on the unload command. I have a query such as: Unload to c:\junk\test.txt delimiter "" select field1, field2, field3 from file1 Even though i put a delimiter of 2 double quotes. I still get pipes. Why? Also if field1 and field2(both char (3)) are blank, the results are...
  6. lbzh

    Mainframe to PC PDF

    I am creating a PDF file on the mainframe, by reading a mainframe print file (FBA 133) and within a data_null statement outputting it to a PDF file using ODS. When I ftp the results to the PC, the page breaks which appeared on the mainframe (in the first column) are not honored in the PDF. Is...
  7. lbzh

    Substitute values based on conditions

    I would like to write a shell script to screen on some conditions for a given line and if valid perform 2 substitutions on that line otherwise the line shall remain as-is. Here is the file: 1234NYABC1LMA 2334NJABC0TR3 4234NJABC1LMA 5234PAABC1LMA 8234SCABC1ZBC If the state (columns 5 and 6) is...
  8. lbzh

    Repacing a string in only 1 column

    I have a file and I wish to replace a specific column if it contains a value to another value An example is below: Input file 222222 121111 323333 I wish to replace the "2" in the 2nd column to a "9" , all other columns remain intact, so the output looks like this: 299999 191111 393333 Thanks
  9. lbzh

    Determining the last digit of a packed number

    I have a field as below: 4 Field1 PIC 9(5) COMP-3. What is the simplest way to extract the last digit of Field1? Example Field1 Last Digit 12345 5 45678 8 Field1 is always greater than 9999 and is always less than 100,000. Thank You.
  10. lbzh

    Packed number conversion

    I wanted the output to contain a decimal and a sign. For instance +.33333b or -.33333b etc. sorry for the vagueness.
  11. lbzh

    Packed number conversion

    I have a v99999 packed number which i wish to convert to an alpha 8. The following is the schema. A is the input, B I am using to unpack A, and C I am attempting to convert the unpacked number to the alpha, I wish to preserve the decimal point and sign (if there is any): 05 A...
  12. lbzh

    convert from comp-3 to picture

    I am trying to read in pic 9(5) comp-3 field as in: 4 AB-QTY PIC S9(5)V99 COMP-3. and then write it out to a file stripping the COMP-3 format and also including a decimal point. This is what I did: MOVE AB-QTY TO OUT-AB-AMT. where OUT-AB-AMT is...
  13. lbzh

    User logic error

    I tried the REWRITE and it worked correctly. Another error I had in my original code I was initializing the record after reading it which set it to 0. Eliminating that and inserting the REWRITE, it now works like a charm. Thanks All.
  14. lbzh

    User logic error

    I am trying to write a cobol program to read a file and increment the contents and write back to the same file, I am trying to increment the first 4 bytes and write back the 4 bytes and the filler of 76. Here is the code: SPECIAL-NAMES. INPUT-OUTPUT SECTION...
  15. lbzh

    Load Wizard

    I am a newbie first time using UDB on Unix. I am using the Load Wizard to load a flat file into a table. All the values are specified in the flat file with the exception of 1 field - timestamp. When I do the insert I would like to record in the table the time the record was inserted. As an...
  16. lbzh

    searching for strings stored in a file

    You were right, I copied it from PC and introduced the carriage control. Once corrected it works like a charm. Thanks very much for your help!!!!!!!!!!!!!! Do you know a good nawk tutorial so I can understand this solution better?
  17. lbzh

    searching for strings stored in a file

    I got this error now: /usr/xpg4/bin/awk: file "acc.awk": line 1: invalid character "^M" Context is: >>> NR == FNR { arr[$0]; next }^M <<< Here is my exact code from the calling script: /usr/xpg4/bin/awk -f acc.awk accounts.txt target2.txt and acc.awk: NR == FNR { arr[$0]; next }...
  18. lbzh

    searching for strings stored in a file

    I ran it as suggested above (using the exact syntax)and here is the error I got: nawk: syntax error at source line 1 context is <<< NR == FNR { arr[$0]; next >>> } nawk: bailing out at source line 1 Any ideas? Thanks
  19. lbzh

    Nulls in Cobol

    I tried the suggestion: IF INPUT-FIELD EQUAL LOW-VALUES MOVE SPACES TO INPUT-FIELD END-IF and it worked great. Thanks all for your input.
  20. lbzh

    searching for strings stored in a file

    Sorry, here are the file formats: File1 12345678901 23456789012 File2 12345678901ABCDEFGHIJ 23456789012DEFGHIJKLM 99999999999KLDSDDSDED The account number is the only entry in File1, and the account number is in the beginning of File2. Thanks

Part and Inventory Search

Back
Top