How to populate low values

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

How to populate low values

Post 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!!
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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...
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post 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?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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).
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post 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?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post 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?
Post Reply