Mapping String Comprehensive Guide

SPFLite introduces a new editing concept:  The use of “mapping strings” to reorder, reformat and transform characters within strings that are found by the CHANGE command.  Mapping strings are defined by a new string type code of M.  

You will find that mapping strings have an wide array of features – probably far more than you will ever need at any given time.  It is much like a “Swiss Army Knife” – a tool having a lot of parts, some of which you will use and some you won't.  Don't let that hold you back from trying them.  You don't need to read everything.  Just focus on the functions you are interested in.  If all you want to do is rearrange columns, you don't need to know how to convert data from ASCII to hex or reformat a decimal value.  Let your own editing requirements drive which areas you want to learn about and explore.  

And yes, this Working With article is quite long.  Just take it one section at a time.  If you have some simple task to do, you may save time by going to the Quick Reference Guide and look at the General Examples section.  You may find something there to immediately get you going.

For some tasks, mapping strings may be powerful enough that you could use them instead of writing an SPFLite edit macro.  If your task involving reformatting data, chances are good that you may be able to do some or all of it with a mapping string.  The main thing you should remember is that the features are here and available, even if you have to reread the directions each time you them to use. Like everything else in SPFLite, you will remember the parts you use the most often, and look up the rest.

Because mapping strings are a feature not present in IBM ISPF, you are encouraged to fully read through this article at least once, to familiarize yourself with all the new capabilities they have to offer and gain the most benefit from them.  For the same reason, we recommend that you test and experiment with mapping strings, perhaps using a small file of test data, to be sure you understand how these features work and to verify you have specified your mapping string correctly before applying it to real data files, until you gain experience with it.  To help with the learning curve, there is a test program you can run to watch how these commands work without having to set up test files.  Refer to the section Using the mapping test program at the end of this article for more information.

Finally, if any issues or questions arise, the SPFLite forum is available to assist you.

Created with the Personal Edition of HelpNDoc: Free HTML Help documentation generator