ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportDFDL - Fixed length fields and ZPL data

Post new topicReply to topic
DFDL - Fixed length fields and ZPL data View previous topic :: View next topic
Author Message
abhi_thri
PostPosted: Fri Jun 08, 2018 8:51 am Post subject: DFDL - Fixed length fields and ZPL data Reply with quote

Master

Joined: 17 Jul 2017
Posts: 217
Location: UK

Hello,
Need some help in defining a DFDL Model for below given data - 2 fixed length fields and a ZPL (Zebra Programming Language) label print info.

DeliveryId - 10 (fixed length)
Status - 6 (fixed length)
ZPL Data - variable length

Quote:

1234567890aaaaaa^XA

^FO220,170^FDUnited States (USA)^FS
^FO50,250^GB700,1,3^FS

^CFA,30
^FO600,300^GB150,150,3^FS
^FO638,340^FDPermit^FS
^FO638,390^FD123456^FS
^FO50,500^GB700,1,3^FS

^FX Third section with barcode.
^BY5,2,270
^FO175,550^BC^FD1234567890^FS

^XZ


Is there a standard way to define DFDL for such data?


Last edited by abhi_thri on Fri Jun 08, 2018 10:34 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jun 08, 2018 9:35 am Post subject: Re: DFDL - Fixed length fields and ZPL data Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25250
Location: Ohio, USA

abhi_thri wrote:
Is there a standard way to define DFDL for such data?


2 fixed length fields and a variable length one?

I don't understand the question you're asking. There seems to be a lot of information on www.zebra.com (which I spent almost 30 seconds reviewing) about data length headers, delimiters and the sort of things you'd include in a DFDL model.

I'd recommend you provide a bit more details around:

- what you're trying to achieve
- how you've done it so far
- why that's not working for you

and with luck that will help use provide insight.

Better information, better advice.

Also give gitHub a try - see if someone's shared anything there that helps.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Jun 08, 2018 9:45 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 855

I agree with Vitor...no point in us telling you to do X if you have already tried X.
Also...I don't see how your description of the format matches the example data that you supplied. Please provide an accurate specification of the data format
plus some _accurate_ examples of the data that you need to output (with variations)
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Fri Jun 08, 2018 11:39 am Post subject: Reply with quote

Master

Joined: 17 Jul 2017
Posts: 217
Location: UK

Vitor/timber...thanks for replying.

Requirement is to retreive the values from BAPI response and forward it to Destination in the format shown in my first post. It is not required to interpret the ZPL data as such as it just need to be passed on as-is to the other side.

Vitor wrote:
2 fixed length fields and a variable length one?


Yes, that is basically it...there is just one record to deal with, 2 fixed length fields and a variable one, just that the variable one (ZPL format) will start from 17th position and will include numerous <LF> chars as part of the data.

So I'm exploring to see whether it is possible to define a variable element in the DFDL model which could accept the whole ZPL data as its value.

In the fixed length DFDL model I tried specifying the variable field as delimited but it could only take till the first <LF> as that is default record delimiter.

Alternatively I could just add the first two values to the ZPL data and send it as a BLOB instead.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Jun 08, 2018 1:44 pm Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 855

OK - now I understand. You want to treat everything from the 17th character as a single record.

I don't think that's the right approach. It would be easy to create a DFDL model to parse the input ZPL data received via BAPI. It's just a repeating record with a few delimited fields.

You could then create a second message (in the same DFDL model) and reuse the ZPL model as part of the output message. That way, if your customer wants to do something more advanced with the ZPL data in future, you will be well positioned for that.
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Sun Jun 10, 2018 11:04 pm Post subject: Reply with quote

Master

Joined: 17 Jul 2017
Posts: 217
Location: UK

hi timber...yes, agree that modeling ZPL would be ideal but it looks like the BAPI response will send the ZPL data just as a repeating field,

Quote:

..LABELRESPONSE
../LABEL - ^XA\r
../LABEL - ^FO220,170^FDUnited States (USA)^FS\r
../LABEL - ^FO50,250^GB700,1,3^FS\r

etc


This means some pre-processing would be required to identify the ZPL record types by explicitly checking the data coming in those records in the code in order before it could be parsed as a ZPL model.

Anyway, thanks for your thoughts.
Back to top
View user's profile Send private message
timber
PostPosted: Mon Jun 11, 2018 12:36 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 855

Quote:
some pre-processing would be required to identify the ZPL record types by explicitly checking the data coming in those records
That's not correct. The ZPL format always begins with ^XA and ends with ^XZ. You could easily add a discriminator to the repeating record to check whether its value is ^XZ.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportDFDL - Fixed length fields and ZPL data
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.