Page 1 of 1

How to populate low values

Posted: Fri Mar 05, 2010 6:18 am
by hitmanthesilentassasin
I have below mentioned 2 questions. could some one please be kind enough to help me understand and solve the issue?

1. I am not sure how to populate the 0's as the low values. using the datastage. the field is of type pic x(004).

2. is there a way to find the nls format without actually knowing the format. I have tried all the nls options preset in datastage but couldnt really find one?

thanks for your help in advance!!

Posted: Fri Mar 05, 2010 7:36 am
by ArndW
Question 1 - are you trying to write to a PIC X(4) field and want to default to using '0'? Or reading from a Cobol file and wanting to set default values?

Question 2 - Please explain the problem in more detail. NLS for reading or writing? There are many NLS settings so it is hard for me to understand how you cannot find one...

Posted: Fri Mar 05, 2010 9:51 am
by hitmanthesilentassasin
thanks for the reply arndw

1. well, I want to set default of low value(0) wherever I have to write null. this would inturn be used in main frames. to load in a database.

2. I have few files for which I am not able to determine how to read the data. the data format is signed packed hex data that I am not able to read. the copy book has occurs depending clauses but I cant read the data. please help!!

3. does datastage convert the occurs depending clause to multiple records or process as one single record?

Posted: Fri Mar 05, 2010 10:07 am
by ArndW
In the first case, look into the column attributes, particularly the 'default' value, which you can set to 0, or more likely to the hex 00 value.

Most likely you are getting cobol copybooks with COMP-3 or other non-DISPLAY columns; plus if you have an OCCURS DEPENDING ON clause then you need to use the CFF stage and chances are high that you need to read the file in EBCDIC. If the file has been transferred and converted to ASCII then it is most likely corrupted (if it contains COMP-3 fields then the odds are 100% that is has been corrupted).

Posted: Wed Mar 10, 2010 7:37 am
by hitmanthesilentassasin
well, I am not able to find the option where I can define the value as hex in the complex flat file stage. Please help me find that?

Posted: Wed Mar 10, 2010 8:20 am
by ArndW
The CFF stage is set up differently, but you only need to use it if you have OCCURS DEPENDING ON or variable REDEFINES; otherwise just use the sequential file stage and set the default value for the columns in question.

Posted: Wed Mar 10, 2010 8:54 am
by hitmanthesilentassasin
thanks for the reply. Can I use \X00 value in transformer or define \x0000 in the null field value and define the character set as ebcidic in the sequential file stage to populate 4 0's in the hex format?