ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Convert Binary To Packed Decimal In Sort Download For Mac
    카테고리 없음 2020. 2. 14. 17:37
    1. Convert Binary To Packed Decimal In Sort Download For Mac Mac
    2. Convert Binary To Packed Decimal In Sort Download For Mac 10
    3. Convert Binary To Packed Decimal In Sort Download For Mac

    What sort of crazy standard would allow for a bunch of bits in a row? Try converting the signal below into binary and then into decimal. For other operating systems, you can find and download a good programmer's calculator. You can see that there is a lot of information packed inside these packets.

    Hi, Let me add more details to my query so that picture becomes more clear. I have a requirement as follows. Source file format as follows.For eg it has four columns first four of varchar2 datatypes and the last Salary column of decimal datatype Empname Companyname DeptName salary ABC HP DW 1000 XYZ Infosys HR 2000 PQR Cognizant ADMIN 3000 Now i want output file in a format where first four columns are in EBCDIC format and the Salary (numeric field) in packed decimal format. I have to implement this requirement in Informatica (ETL) or Unix.

    As it is not possible in informatica the only option left is Unix for me. My approach: To split the columns in two files say file1 & file2 In first file i will have first four columns and in the second file i will have the salary column. As i need to convert the first four columns in EBCDIC, will use unix dd command which will convert the entire file into EBCDIC. Now i need to convert the second file which contains the salary column into packed decimal.

    Once this is acheived,i will use unix's paste command so that i have one file which has first four columns in EBCDIC and the salary column in packed decimal. I am really not sure whether this approach would work or not?

    I am new to unix.My main area of work is Informatica. Please suggest me a better approach if you have. Hi Aniket, when you are talking EBCDIC, you are probably going to need fixed width columns. Since the employee name can have embedded blanks, your input file is going to have a delimiter (not blank) or fixed width columns. Either way, I could see where you would be able to read the alphabetic columns in awk and format the output with printf for further processing with dd.

    Convert Binary To Packed Decimal In Sort Download For Mac Mac

    The packed decimal field is a nice challenge. You can either right-align the value and translate to EBCDIC first, then use the mainframe to perform the pack operation. If that is not an option, you can probably use awk to perform the pack and finally paste the columns back together, just like you had in mind.

    Convert Binary To Packed Decimal In Sort Download For Mac 10

    What are the column widths in the target format? If you have not worked it out yet The Rexx language is good at his sort of conversion (assumes you have / can install rexx). The translate function will convert one character into another and can be used to do Ascii EBCDIC conversion. To convert A - 1, B - 2 do s = translate(s,'12','AB') the X2C can be used to setup the packed decimal (for packed decimal to String ther is a c2x function) code to convert a character string (number) to packed Decimal is roughly: if number 0 then do s = number'F' /. F is the packed decimal nosign??./ end; else do number = number.1 s = number'D' /. D is negative./ end packedDecimal5bytes = x2c(right(s,10,'0')) packedDecimal4bytes = x2c(right(s,8,'0')) packedDecimal3bytes = x2c(right(s,6,'0')).

    Hi Bruce, Thanks for the reply.I am still stuck with it. Unfortunately i cannot use Rexx language.It has to be done in Unix Informatica.

    On Sun, May 24, 2009 at 1:56 PM, Bruce Martin via shellscript-l wrote: If you have not worked it out yet The Rexx language is good at his sort of conversion (assumes you have / can install rexx). The translate function will convert one character into another and can be used to do Ascii EBCDIC conversion. To convert A - 1, B - 2 do s = translate(s,'12','AB') the X2C can be used to setup the packed decimal (for packed decimal to String ther is a c2x function) code to convert a character string (number) to packed Decimal is roughly: if number 0 then do s = number'F' /.

    Convert Binary To Packed Decimal In Sort Download For Mac

    Decimal

    F is the packed decimal nosign??./ end; else do number = number.1 s = number'D' /. D is negative./ end packedDecimal5bytes = x2c(right(s,10,'0')) packedDecimal4bytes = x2c(right(s,8,'0')) packedDecimal3bytes = x2c(right(s,6,'0')).

Designed by Tistory.