Sequential stage - changing the default padding symbol

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
jmorgan
Participant
Posts: 10
Joined: Thu Mar 10, 2005 7:29 pm
Location: Brisbane, Australia

Sequential stage - changing the default padding symbol

Post by jmorgan »

Hi Folks

How does one change the initial configuration for a sequential stage?

The default padding character is # and i want to change it to a different character.

Is there a configuration file somewhere the # character is read from?

Thanks

Jon
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can change an individual Sequential File stage pad character on the Format tab. You can change it individually within the Columns grid, either by scrolling to the right or by choosing Edit Row from the right mouse menu.

But, I feel, your question is where does the default for all Sequential File stages come from? We're talking inheritance here. When you put a Sequential File stage on a design canvas, you're instantiating a Sequential File stage object from the class of Sequential File stages. You can see these in the Stage Types branch of the Repository; they are stored in the DS_STAGETYPES hashed file, and are all read-only by default. There is a record in DS_STAGETYPES for the server job Sequential File stage, another record for the parallel job Sequential File stage, and yet another for the mainframe job Sequential File stage.

Theoretically you could edit the DS_STAGETYPES record, but at your own risk. Another strategy might be to do a search and replace in a DSX or XML export file, then re-import (though beware that the "#" character has other purposes in DataStage).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ravij
Premium Member
Premium Member
Posts: 170
Joined: Mon Oct 10, 2005 7:04 am
Location: India

Sequential stage - changing the default padding symbol

Post by ravij »

Hi Ray,
"#" character has other purposes in DataStage
can you tell me something about # using in Seq File Stage?
thanks in advance.
Ravi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

ravij,

when you use a job parameter you need to use #ParameterName# in many places where a constant string (as opposed to a function/routine/variable) is expected and this is what Ray referred to.
jmorgan
Participant
Posts: 10
Joined: Thu Mar 10, 2005 7:29 pm
Location: Brisbane, Australia

Post by jmorgan »

FYI.

No, none of this will work.

I logged a call with Ascential and we've come to the conclusion that the default padding symbol value of '#' is set in the SequentialFile stage.

I'm also a bit confused as to why some stage types (SequentialFile stage included) have a property page but the stages ignore any property values configured there. Try it, those property values are ignored by the stage.
ray.wurlod wrote:You can change an individual Sequential File stage pad character on the Format tab. You can change it individually within the Columns grid, either by scrolling to the right or by choosing Edit Row from the right mouse menu.

But, I feel, your question is where does the default for all Sequential File stages come from? We're talking inheritance here. When you put a Sequential File stage on a design canvas, you're instantiating a Sequential File stage object from the class of Sequential File stages. You can see these in the Stage Types branch of the Repository; they are stored in the DS_STAGETYPES hashed file, and are all read-only by default. There is a record in DS_STAGETYPES for the server job Sequential File stage, another record for the parallel job Sequential File stage, and yet another for the mainframe job Sequential File stage.

Theoretically you could edit the DS_STAGETYPES record, but at your own risk. Another strategy might be to do a search and replace in a DSX or XML export file, then re-import (though beware that the "#" character has other purposes in DataStage).
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Which exact 7.x version are you running? And are you under the impression that none of the property values are changeable for you or are you just having an issue with the default padding symbol? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
jmorgan
Participant
Posts: 10
Joined: Thu Mar 10, 2005 7:29 pm
Location: Brisbane, Australia

Post by jmorgan »

> Which exact 7.x version are you running?

DataStage version 7.5.1.a

> And are you under the impression that none of the property values are changeable for you or are you just having an issue with the default padding symbol?

Both.

It seems certain stage types do not use the respository for their default properties; Sequential File stage is one of these.
It seems they've hardcoded the default padding symbol to #.

chulett wrote:Which exact 7.x version are you running? And are you under the impression that none of the property values are changeable for you or are you just having an issue with the default padding symbol? :?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm a little lost on exactly what your original problem was. I am running 7.5.1A on H-PUX and am not having an issue with the default padding character in the Sequential file stage.

Yes, you are right that the default padding symbol does seem to be 'hardcoded' to a '#' but it is easily changed on the Format tab of the stage. You can even override that default padding by using a different, specific padding character in the Padding column of each individual field.

It is only used to 'pad' missing columns - for example, null fields in a fixed width file would use it.

So... are you saying that you change the default padding from a '#' to (let's say) a '?' in the Sequential File stage in a job, run it and the output in the file for any missing column is still padded with '#'? If that is the case, can you verify that the 'Padding' column for that field is still blank as well?

Or is this, as Ray mentioned, all about trying to change what the default padding character defaults to when you add a new instance of the stage to a job? There is a Properties tab for the CSeqFilesStage where it looks like you can change that, but by design those objects are read only. You could, however, go under the covers, make the object NRO, change the value, flip it back to RO and then see if that gets you what you want... I suppose.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jmorgan
Participant
Posts: 10
Joined: Thu Mar 10, 2005 7:29 pm
Location: Brisbane, Australia

Post by jmorgan »

> Or is this, as Ray mentioned, all about trying to change what the default padding character defaults to when you add a new instance of the stage to a job?

Yes this is what i'm trying to achieve.

> There is a Properties tab for the CSeqFilesStage where it looks like you can change that, but by design those objects are read only. You could, however, go under the covers, make the object NRO, change the value, flip it back to RO and then see if that gets you what you want... I suppose.

This is similar to what Ray mentioned but doesn't work. Try it, it won't work.
The Sequential File stage ignores the respository for its default values, it instead uses its own hardcoded values.

chulett wrote:I'm a little lost on exactly what your original problem was. I am running 7.5.1A on H-PUX and am not having an issue with the default padding character in the Sequential file stage.

Yes, you are right that the default padding symbol does seem to be 'hardcoded' to a '#' but it is easily changed on the Format tab of the stage. You can even override that default padding by using a different, specific padding character in the Padding column of each individual field.

It is only used to 'pad' missing columns - for example, null fields in a fixed width file would use it.

So... are you saying that you change the default padding from a '#' to (let's say) a '?' in the Sequential File stage in a job, run it and the output in the file for any missing column is still padded with '#'? If that is the case, can you verify that the 'Padding' column for that field is still blank as well?

Or is this, as Ray mentioned, all about trying to change what the default padding character defaults to when you add a new instance of the stage to a job? There is a Properties tab for the CSeqFilesStage where it looks like you can change that, but by design those objects are read only. You could, however, go under the covers, make the object NRO, change the value, flip it back to RO and then see if that gets you what you want... I suppose.
Post Reply