The first part of your data is in a fixed position, the thing is to get the final part also in a fixed position. You can use JFY with SHIFT=RIGHT to do that. Once you've got all the data you want in fixed positions, it is simple with BUILD.
No. It doesn't always end with 01. And key1 and key2 that i have mentioned is actually time stamp. so there are "-" elsewhere too.Only thing that is common in all the records is that the output i need contains "00000-0000" i.e, first five bytes and last four bytes are always numbers. So is there anything that could trace this pattern and get me output along with key1(timestamp).
With a variable number of variable-length data items (you could have A E I O U Incorporated, you could have dashes, numbers) and with variable-length data following what you want to extract, it is not going to be convenient.
SORT has no loop-constructs. Although your field is second-from-the-end, that, as a PARSEd field, could be number 10, or number 81.
What is the maximum length of that final field, and how many fields may precede the data you want to extract such that the minimum data-lengths would add up to that length? Then you JFY right, chop off enough to guarantee having your data, and "manually" (coded-out) PARSE to find which field is second-from-last (field after last would be blank).
It's the penalty of not having delimiters, or fixed-length fields or a fixed number of items. Basically a design fault. Although "languages" can find the second-to-last in this case, in others you'd have trouble if the final field contained "words".
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