Author |
Message
|
EricCox |
Posted: Tue Sep 24, 2013 11:03 am Post subject: DFDL and Setting a Default Value Not Working |
|
|
Master
Joined: 08 Apr 2011 Posts: 292
|
To all,
We are using DFDL to output Fixed Width Flat Files.
We aren't able to set the default value and get it to come out in the file.
Has anyone gotten the default value working in DFDL output?
We found a document that said this isn't supported but I wanted to check with the group and see what you say.
Thanks,
EMC |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Sep 24, 2013 11:26 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Can you link to that document?
I'm sure that Kimbert will be along (probably tomorrow) to give you the right pointers. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Sep 24, 2013 9:43 pm Post subject: Re: DFDL and Setting a Default Value Not Working |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
EricCox wrote: |
To all,
We are using DFDL to output Fixed Width Flat Files.
We aren't able to set the default value and get it to come out in the file.
Has anyone gotten the default value working in DFDL output?
We found a document that said this isn't supported but I wanted to check with the group and see what you say.
Thanks,
EMC |
You will need to specify the runtime and toolkit versions you are using. I cannot swear but I am nearly certain that I did get the default values out sometime ago. |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Sep 24, 2013 9:58 pm Post subject: Re: DFDL and Setting a Default Value Not Working |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
dogorsy wrote: |
EricCox wrote: |
To all,
We are using DFDL to output Fixed Width Flat Files.
We aren't able to set the default value and get it to come out in the file.
Has anyone gotten the default value working in DFDL output?
We found a document that said this isn't supported but I wanted to check with the group and see what you say.
Thanks,
EMC |
You will need to specify the runtime and toolkit versions you are using. I cannot swear it but I am nearly certain that I did get the default values out sometime ago. |
1- I don't know why my post was duplicated. sorry for that. (probably did a quote rather than edit)
2- I have just had a quick test, defined a 3 elements record, each fixed length 10, padded with spaces, default values value1, value2 and value3. Create the output record and the default values are set without any problem.
3- I am using WMB v8.0.0.2
Code: |
2013-09-25 07:25:09.844406 4564 UserTrace BIP5841I: ''Offset: 0. Starting to write root element 'testDFDL'.''
2013-09-25 07:25:09.844425 4564 UserTrace BIP5841I: ''Offset: 0. Starting to process element 'testDFDL'.''
2013-09-25 07:25:09.844450 4564 UserTrace BIP5841I: ''Offset: 0. Starting to process element 'body'.''
2013-09-25 07:25:09.844481 4564 UserTrace BIP5841I: ''Offset: 0. Starting to process element 'ele1'.''
2013-09-25 07:25:09.844505 4564 UserTrace BIP5841I: ''Offset: 0. Element 'ele1' is required and missing. The default value 'value1' has been assigned to the element.''
2013-09-25 07:25:09.844573 4564 UserTrace BIP5841I: ''Padded left-justified text string 'value1' with '10' bytes, using pad byte 'd79c980', for element 'ele1'.''
2013-09-25 07:25:09.844601 4564 UserTrace BIP5841I: ''Offset: 0. Wrote text string value 'value1' for element 'ele1'. ''
2013-09-25 07:25:09.844621 4564 UserTrace BIP5841I: ''Offset: 10. Finished processing element 'ele1'.''
2013-09-25 07:25:09.844638 4564 UserTrace BIP5841I: ''Offset: 10. Starting to process element 'ele2'.''
2013-09-25 07:25:09.844653 4564 UserTrace BIP5841I: ''Offset: 10. Element 'ele2' is required and missing. The default value 'value2' has been assigned to the element.''
2013-09-25 07:25:09.844693 4564 UserTrace BIP5841I: ''Padded left-justified text string 'value2' with '10' bytes, using pad byte 'd79c980', for element 'ele2'.''
2013-09-25 07:25:09.844716 4564 UserTrace BIP5841I: ''Offset: 10. Wrote text string value 'value2' for element 'ele2'. ''
2013-09-25 07:25:09.844732 4564 UserTrace BIP5841I: ''Offset: 20. Finished processing element 'ele2'.''
2013-09-25 07:25:09.844750 4564 UserTrace BIP5841I: ''Offset: 20. Starting to process element 'ele3'.''
2013-09-25 07:25:09.844767 4564 UserTrace BIP5841I: ''Offset: 20. Element 'ele3' is required and missing. The default value 'value3' has been assigned to the element.''
2013-09-25 07:25:09.844789 4564 UserTrace BIP5841I: ''Padded left-justified text string 'value3' with '10' bytes, using pad byte 'd79c980', for element 'ele3'.''
2013-09-25 07:25:09.844808 4564 UserTrace BIP5841I: ''Offset: 20. Wrote text string value 'value3' for element 'ele3'. ''
2013-09-25 07:25:09.844824 4564 UserTrace BIP5841I: ''Offset: 30. Finished processing element 'ele3'.''
2013-09-25 07:25:09.844842 4564 UserTrace BIP5841I: ''Offset: 30. Finished processing element 'body'.''
2013-09-25 07:25:09.844860 4564 UserTrace BIP5841I: ''Offset: 30. Finished processing element 'testDFDL'.'' |
please note:
Code: |
BIP5841I: ''Offset: 0. Element 'ele1' is required and missing. The default value 'value1' has been assigned to the element.'' |
so make sure your elements are mandatory if you want them defaulted. |
|
Back to top |
|
 |
EricCox |
Posted: Wed Sep 25, 2013 5:36 am Post subject: Link to Document |
|
|
Master
Joined: 08 Apr 2011 Posts: 292
|
|
Back to top |
|
 |
kimbert |
Posted: Wed Sep 25, 2013 6:52 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
That's quite an old document. The info center should list any unimplemented features in DFDL. It changes with every release ( DFDL keeps getting better ) so you will need to check the correct version of the info center. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
dogorsy |
Posted: Wed Sep 25, 2013 11:14 am Post subject: Re: Link to Document |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
EricCox wrote: |
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&frm=1&source=web&cd=4&cad=rja&ved=0CDgQFjAD&url=http%3A%2F%2Fwww.ogf.org%2FOGF34%2Fmaterials%2F2430%2Fogf34-dfdl-wg-session-v002.pdf&ei=UuxBUovoHNOj4AOWwYHgDQ&usg=AFQjCNFi9n1Goiqf2tX6ACffV1cYiuqM3Q
Here is the link. Sorry it didn't come thru when I tagged it as URL. |
Irrelevant. I have already proved it works. Have you considered the possibility that maybe you are doing something wrong ? |
|
Back to top |
|
 |
|