Problem with APT_STRING_PADCHAR

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
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Problem with APT_STRING_PADCHAR

Post by Nageshsunkoji »

Hi Folks,

I am facing a strange problem with $APT_STRING_PADCHAR. I am using this varible for my DB2 EE Load job. It's working fine for my Load job. But, the problem is , when i Tried to set this variable in the sequence. This variable is affecting the other jobs(which don't have $APT_STRING_PADCHAR variable) which are present in the sequence. It's not filtering the values in the filter stage for CHAR columns and the strange thing is filter is happening with integer columns.

Please suggest me to sort out from this problem.

Is the varible $APT_STRING_PADCHAR setting in the sequence will affect the other jobs, even though those jobs are not using this environment variable.

Thanks & Regards,
Nagesh.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Post by pavankvk »

$APT_STRING_PADCHAR is a global level variable applicable for the whole project and all the jobs in it.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Re: Problem with APT_STRING_PADCHAR

Post by ArndW »

Nageshsunkoji wrote:...even though those jobs are not using this environment variable...
The fact that the environment variable is not explicitly declared does not mean that the EE jobs don't use it. The same applies to ALL environment variables. If they are not explicitly set in the parameters of a job then their values are inherited.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What is the value assigned to the variable? What is the filter condition and what is getting escaped?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Re: Problem with APT_STRING_PADCHAR

Post by Nageshsunkoji »

Arnd,

Thanks for your reply.

My problem is the APT_STRING_PADCHAR is affecting the jobs, which don't have DB2 EE Stages.

My Job flow :

first Job

DB2 API STAGE ..................Dataset

Second Job



DATASET ( this one from First Job)..............FILTER .................. DATASET

So, the above two jobs are part of my sequence.These two jobs are not using any environment variable.

But, if I used the APT_STRING_PADCHAR in the sequence, It is affecting the above two jobs also.
Records are not filtering the CHAR values.

Regards
Nagesh.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

IF you tend to change the default value of the variable after assigning in the sequence, yes it will affect.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The APT_STRING_PADCHAR is used anytime a string needs to get padded and not only for DB/2 EE stages. So if you changed the pad char to "x" and do a transform or implicit conversion from a varchar(3) to a CHAR(10) column then it will use 'x'. If this is wrong in the specific job, add APT_STRING_PADCHAR to your job's parameters and give it the value you want.
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

$APT_STRING_PADCHAR issue

Post by Nageshsunkoji »

The problem with regards to $APT_STRING_PADCHAR is coming in specific project. In development project the sequence using this parameter works fine. However, in the sys test project the sequence is giving problem. Is there any other enviornment variable which is dependent on $APT_STRING_PADCHAR or is it something to do with data problem? Help on this would be very helpful.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Nagesh, there really isn't a (DataStage) problem here.

When DS needs to perform padding it will use the APT_STRING_PADCHAR value unless you override it. The job will use the current APT_STRING_PADCHAR, that value is set to a default value at project level but can be changed or set at a job level.

It would seem that your development and production default settings are different. There are no other environment variables that are dependant on this one. There are other padding settings out there (I recall having had issues with the ORACLE one in the past). But this one is what controls the default padding of strings in PX jobs.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

And more over, this variable is not required to be inserted into the any job or sequence, unless it is required to be changed. Is there any specific reason that, the use of variable in the sequence?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply