How to convert a field to spaces blindly - datastage

I have a delimited sequential file. This file has a field that is variable length. I want to make this field blank. Can some suggest how to convert the field to spaces?
Thanks in advance for any help.

The easiest way is this expression in a Transformer stage
Space(Len(InLink.MyString))

Related

Docvariable with empty string value

In word, I'm using docvariables to manage pluralization.
A VBA macro is changing the value of several docvariables to pluralize / singularize them.
But sometimes I want to use a Docvariable only for enable/disable a 's' suffix.
Problem: I cannot set it to empty string, because it deletes the docvariable.
The field displays an error in word.
So I'm searching a way to achieve this, it could be :
A way to keep a Docvariable existing, with empty string or equivalent value
A field formula which make this job if the variable doesn't exist
Any other workaround would be appreciated.
Thank you
A Document Variable (used in DocVariable field codes) cannot exist if it has no content.
A possibility would be to also store the space in this DocVariable so that it display s[space] or just [space].
Otherwise you may need to write this information to a Bookmark (possibly using a Set field) and display the content using a Ref field.

Modify certain section of csv file

I have a csv file that has multiople lines, which uses "|" as delimiter as the following shows.
MAIN|02/21/2018|7695154880|082.21|00021
MAIN|02/21/2018|7695154880|000.21|00210
I would like to remove the leading zeros of forth and fifth sections so the following shows desired result. Is there any way can do it in powershell? Thank you.
MAIN|02/21/2018|7695154880|82.21|21
MAIN|02/21/2018|7695154880|0.21|210
Agree with Olaf here, including the zero thing.
Yet, maybe it's just the visual thing for you.
Anyway, what you are asking for is similar to this post.
Remove leading zeros in csv file from int values only
I have this csv file I'm trying to remove leading zeros from
Remove leading zeros in csv file from int values only
I initially thought Regex like [regex]::replace($value,'^(0+)','')
But - in my opinion it would be better just to do
$csv|Foreach-Object{$_.ValueTORemoveLeadingZeroesFrom=
[float]$_.ValueTORemoveLeadingZeroesFrom}
By casting string to float You actually get this done easier I think?

Export data records from filemaker pro 16 with all strings quoted with ""

Is it possible to export data records from filemaker and have all strings be in a "" quote? With string I mean type = text. Numbers shouldn't change though.
There’s no option I'm aware of that provides this behavior when exporting.
The fieldType() function may be helpful.
https://fmhelp.filemaker.com/help/16/fmp/en/index.html#page/FMP_Help/fieldtype.html
Or, just create a single calc field "row" with all of the fields you want included - with appending quotes around the text fields - and do a .tab export of "rows" instead. That's generally how I handle it.
If you export as CSV, this is the default behaviour as long as you do not export the "Apply current layout’s data formatting..." setting enabled.
I have the same issue.
To strip the quotes from the .csv, I open the .csv in Excel and save the file in Excel as a .csv.
This strips the double quotes.

I want to remove the space and special characters between the a records,

Actual Record
"102","kal12 3# ","18009","10009","29","HR","del"
What I want (Expecting record)
"102","kal123","18009","10009","29","HR","del"
For above scenario,If you see the record "kal12 3#" which is actual record but I want transform the record as like "kal123" I were used "StringHandling.CHANGE("hello world!","world","guy")" function for remove the special characters and for space removing used StringHandling.TRIM(" hellow world! ")
But I want to remove the space and special characters at a time,so can anyone please help me to resolve this issue.
I am Using Talend open studio
Thanks& Regards,
Naresh
Supposing the field name is row1.myField, try this in a tMap:row1.myField.replaceAll("[# ]", "")
You just have to include each character you want to remove from row1.myField between the square brackets.
Hope this helps.
TRF

TYPO3 Flux field text - csv data

I'm using fluidcontent and inside a flux text field I'm saving csv data.
How can I split the string on every newline? It looks like the \n is not being saved.
The following code does not work.
<v:iterator.explode content="{settings.csv}" glue="\n" as="lines">
The split between columns works well with
<v:iterator.explode content="{settings.csv}" glue=";" as="elements">
I'm thankful for every help.
Cheers
You could also use the CommaSeparatedValueProcessor in the FLUIDTEMPLATE object to generate an array with all the lines and fields.
To split on newline the glue argument needs a value of "constant:LF" as described in the documentation
<v:iterator.explode content="{settings.csv}" glue="constant:LF" as="line">
{line}
</v:iterator.explode>