Page 1 of 1

XML formatting using SORT

Posted: Thu Apr 26, 2012 12:42 pm
by MDP
I have a VB (variable block) file which has some data fields and some xml fields.
My requirement is to sort the data fields to 1 file and the xml fields to a separate file which will be attached to a identifier. Later on, again merge the data file and xml file back into 1 file and use this file for loading data to table.
We are using BMC Unload and BMC Load utility

When I run the BMC Unload query, it unloads data to a VB file. The structure looks like below -

FBC ¿N Raven HolleyRAVEN HOLLEY nkä< í à AS2 S Y <?xm
BQC ¿N Emily BudneyEMILY BUDNEY ën î ` AP02 S Y ª<?xm
BOC ¿N Derek GossDEREK GOSS oÁ ÍÌâ AS0 S Y <?xml
BBL zY b° bÅø ZB9E S YYN <?xml version="

Now, I am not able to sort the fields as some columns are NULL and hence, the data after the null column gets shifted forward. So, I do not have any fixed position for a column and hence, I am finding it very difficult to SORT.

Any inputs on this would be of great help.

Posted: Thu Apr 26, 2012 10:00 pm
by Frank Yaeger
Are you asking how to use DFSORT to do the sorting? (If not, you can ignore the rest of this note.)

If so, you need to show your sample records in hex so we can see what they actually look like. Identify the sort fields you want to use. Identify the null fields (are they X'00' fields or something else?). Show the output you expect.

DFSORT has a PARSE function for dealing with delimited fields, but you haven't given enough information for me to tell if PARSE would be relevant. If you want to read about PARSE, you can find the DFSORT books at: ... g3T7000080