Hello,
Is there a way to specify that a binary field is signed in datastage? I have a binary field Periodkey with value as 6957, however when I multiply it with -1 in the extract JCL it converts it into a integer value and doesnt shows the correct value as -6957 in datastage. it shows value as 0.
So I am trying to understand whether we can have a negative value in the binary format?
Thanks,
Sandeep
Is there a way to specify that a binary field is signed?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 27
- Joined: Fri May 02, 2008 8:01 am
- Location: Mumbai
Yes, binary fields can be signed in DataStage. But you need to know which type of binary you are using and also which type of negative representation. This is easiest with the COBOL type fields, but can also be done with other binary representations.
So, what sort of a binary field do you have?
So, what sort of a binary field do you have?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 27
- Joined: Fri May 02, 2008 8:01 am
- Location: Mumbai
Hello,
Thank you.
I have PERIODKEY as PIC S9(4) COMP. and OUTLETKEY as PIC S9(9) COMP.
PERIODKEY = 6957 and OUTLETKEY = 9.
So What I am trying to do here is Multiply the SQL statement with -1 i.e
SELECT (PERIODKEY * -1),(OUTLETKEY * -1)
FROM CDS.FCREIMBS A
So I expected this to be seen in datastage as -6957 and -1 but it shows min and max integer values...any idea why it shows min/max values of integers?
I define the above fields as Binary in CFF stage.
Are there different types of binary reprensation on cobol coybooks?
Thanks for the help
Thank you.
I have PERIODKEY as PIC S9(4) COMP. and OUTLETKEY as PIC S9(9) COMP.
PERIODKEY = 6957 and OUTLETKEY = 9.
So What I am trying to do here is Multiply the SQL statement with -1 i.e
SELECT (PERIODKEY * -1),(OUTLETKEY * -1)
FROM CDS.FCREIMBS A
So I expected this to be seen in datastage as -6957 and -1 but it shows min and max integer values...any idea why it shows min/max values of integers?
I define the above fields as Binary in CFF stage.
Are there different types of binary reprensation on cobol coybooks?
Thanks for the help
-
- Participant
- Posts: 27
- Joined: Fri May 02, 2008 8:01 am
- Location: Mumbai
Hello,
Thank you.
I have PERIODKEY as PIC S9(4) COMP. and OUTLETKEY as PIC S9(9) COMP.
PERIODKEY = 6957 and OUTLETKEY = 9.
So What I am trying to do here is Multiply the SQL statement with -1 i.e
SELECT (PERIODKEY * -1),(OUTLETKEY * -1)
FROM CDS.FCREIMBS A
So I expected this to be seen in datastage as -6957 and -1 but it shows min and max integer values...any idea why it shows min/max values of integers?
I define the above fields as Binary in CFF stage.
Are there different types of binary reprensation on cobol coybooks?
Thanks for the help
Thank you.
I have PERIODKEY as PIC S9(4) COMP. and OUTLETKEY as PIC S9(9) COMP.
PERIODKEY = 6957 and OUTLETKEY = 9.
So What I am trying to do here is Multiply the SQL statement with -1 i.e
SELECT (PERIODKEY * -1),(OUTLETKEY * -1)
FROM CDS.FCREIMBS A
So I expected this to be seen in datastage as -6957 and -1 but it shows min and max integer values...any idea why it shows min/max values of integers?
I define the above fields as Binary in CFF stage.
Are there different types of binary reprensation on cobol coybooks?
Thanks for the help
In what stage are you doing a "SELECT" and does this not return non-binary display values which can then be used by DataStage?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 27
- Joined: Fri May 02, 2008 8:01 am
- Location: Mumbai
So how do you declare this field in your CFF stage? If it is a DB2 query, then chances are high that the data is not transferred as binary, but as EBCDIC text data. You could check this with a binary display tool and see if you are getting actual binary data or text data on the UNIX machine.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>