syncsort convert pd with precision to zdf - sorting

I have a need to convert pack decimal(pd) with precision like S9(8)V99 to zone decimal(zd).
for example: 12345678 should converted like 123456.78
I try to do that by the syntax :
outrec fields=(1,4,pd,zdf,edit=(IIIIII.TT))
but i got a syntax error on the edit phrase
A Google search shows nothing...
What is the correct syncsort syntax?

I solved it .
outrec fields=(1,4,pd,edit=(IIIIII.TT)) do the work

Related

How can I format time output in Power Automate

In my power automate flow, I have an action that give time output in this format: 2022-12-01T18:52:50.0000000Z
How can I take this output and format as yyyy/mm/dd .
I want to use the time output as string for a folder structure.
https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#formatDateTime
Assuming you have a variable called DateTime, you would create another variable and use this expression ...
formatDateTime(Variables('DateTime'), 'yyyy/MM/dd')
Result
This is pretty straight forward.
Use the Convert datetime to text function
In the Format to use dropdown select Custom
and specify the format how you would like it to appear.
yyyy/MM/hh will give you 2022/12/01
HH-mm-ss will give you 18-52-50

How to format a number with XPath in Tibco BW 5

I've managed to format the following lines in XPath, from this format:
1000.50
30
to this:
100050
3000
The solution I've adopted is:
concat(substring-before([number], '.'), substring-after([number], '.'))
If the . is not present I directly multiply the number by 100.
I'm wondering if there is any better way to do that. My second thought was using Java.
What goes wrong if you just multiply by 100? So long as the result of multiplying by 100 is an exact integer, it should be formatted without a "." when converted to a string. If there are rounding errors that mean the result is not an exact integer, you might want to use round().
The concat() approach seems fragile to me: what if someone gives you input like 1000.5 or perhaps 1000.500?

Oracle BI Publisher, RTF Template Date format

I have used "Date, MM/DD/CCYY" under the <format> column in the RTF, when used in SQL developer I get proper output where CC is replaced with century(e.g. 03/07/2016 as per the format "MM/DD/CCYY" will be 03/07/2116 [21st century]) but in RTF I get the output as 03/07/CC16.
I also tried TO_CHAR(FIELD,’MM/DD/CCYY’) but its not working. Can you please let me know the issue, why the format is not workin
Try using small 'yy' instead of 'YY'.Hopefully you will get the output.
if you want to display concatenated with CC then use small yy,else you can do like this "MM/DD/CC/YY" Or "MM/DD/CCyy"
Please post if you have any other concerns.

MATLAB - image huffman encoding

I have a homework in which i have to convert some images to grayscale and compress them using huffman encoding. I converted them to grayscale and then i tried to compress them but i get an error. I used the code i found here.
Here is the code i'm using:
A=imread('Gray\36.png');
[symbols,p]=hist(A,unique(A))
p=p/sum(p)
[dict,avglen]=huffmandict(symbols,p)
comp=huffmanenco(A,dict)
This is the error i get. It occurs at the second line.
Error using eps
Class must be 'single' or 'double'.
Error in hist (line 90)
bins = xx + eps(xx);
What am i doing wrong?
Thanks.
P.S. how can i find the compression ratio for each image?
The problem is that when you specify the bin locations (the second input argument of 'hist'), they need to be single or double. The vector A itself does not, though. That's nice because sometimes you don't want to convert your whole dataset from an integer type to floating precision. This will fix your code:
[symbols,p]=hist(A,double(unique(A)))
Click here to see this issue is discussed more in detail.
first, try :
whos A
Seems like its type must be single or double. If not, just do A = double(A) after the imread line. Should work that way, however I'm surprised hist is not doing the conversion...
[EDIT] I have just tested it, and I am right, hist won't work in uint8, but it's okay as soon as I convert my image to double.

How I can format date in report to appear exactly as I want - RDLC

I have a report in my application and this report will show a long date from db and I used this expression to make it shorter:
=FormatDateTime(Fields!StatementDate.Value,DateFormat.ShortDate)
and the date will show like this : 1/1/2010
I need to make it like this : 2010/1/1
How I can do it?
That expression do the trick
=CDate(Fields!Fecha.Value).ToString("yyyy/M/d")
I think that it is a lot cleaner to use the Format property rather than format it in your expressions:
http://msdn.microsoft.com/en-us/library/ms252080%28v=vs.90%29.aspx
You can use the standard .NET formatting strings.
Value=Fields!StatementDate.Value
Format=yyyy/M/d
Fields!StatementDate.Value will need to be a DateTime, if not you can try convert it:
Value=CDate(Fields!StatementDate.Value)
=CDate(Fields!StatementDate.Value).ToShortDateString()

Resources