Working with File Profiles

Contents of Article


What about files with no extension ?

The DEFAULT Profile

What settings are maintained in each Profile ?

Automatic Colorization linkage

Managing changes to a Profile

Profile display

Profile locking

Profile USING

Copying Profile settings


There are many different settings and customization options that can be chosen when editing a file, such as whether to use Tab columns and where they are located, Auto Backup and Auto Save options, Caps mode, the definition of WORD characters, etc.   With the different types of files you may edit, you will often need different settings for each file type.

Source files used in programming languages usually use different tab settings, colorization options, and delimiters.  Text data files likewise often have differing requirements.

SPFLite provides the ability to save these settings individually for each different file type as described by the file extension, such as  .BAT .TXT .CPP etc.  SPFLite links a file's extension to its Profile, and will handle the creation and maintenance of Profiles automatically as you work with different file types.

Profile information is stored in the SPFLite directory in a folder called Profiles.  A Profile file has the name of the profile, and an extension of INI.  So, the Profile file of the profile name TXT is stored in the file SPFLite\Profiles\TXT.INI.

What about files with no extension ?

You may occasionally need to store Profile information for files having no extension at all.  One use for this is if you were trying to emulate an environment similar to that on an IBM mainframe, using the Hercules mainframe emulator, and you wanted to use mainframe-like dataset naming conventions for your PC files.  (Mainframe data sets do not have extensions.)

This can be handled by using an option available on the General tab of the Global Options dialog, Use DIR name as Profile when no File extension.

If this is option unchecked, then SPFLite will use the DEFAULT profile (see DEFAULT description below) for files of this type.

If this option is checked, then the parent directory where the file resides will be used as the profile name.

For example, suppose all COBOL source files are in a COBOL directory.  Under mainframe ISPF, it would be common to see these in a dataset named like MYUSERID.TEST.COBOL with 'member names' like MYCODE.

If your PC source file was stored in C:\MyUserid\TEST\COBOL\MyCode, an SPFLite profile name of COBOL would be used for the MyCode file, because COBOL is the parent directory of MyCode.

The DEFAULT Profile

There are a wide variety of file types, which are still basically just common text files.   (e.g. BAT, INI, CSV etc.)  You can certainly have separate Profiles for each of these files, but after a while, you may find you have dozens of profiles, most of them having exactly the same set of options chose.  This is not only wasteful of space, but if you decide to alter one or two Profile options, you are faced with then making that change to a large number of Profiles.

Enter the DEFAULT profile.

The reserved profile name DEFAULT has the following characteristics:

Here you can choose to always use the DEFAULT.INI Profile for this new file type, proceed to create a separate new Profile for this file type, or select another existing Profile to use for this new file type.

What settings are maintained in each Profile ?

The following settings are kept uniquely for each different Profile:


Specify automatic SAVE / VSAVE


Whether to create a backup file.


Whether to use AUTOCAPS support or not.


Whether to automatically save a file at END processing time.


The left/right column boundaries for the file.


Whether CAPS is to be forced on or not.


Default case handling for FIND/CHANGE literals.


Whether string changes are handled in Data Shift (DS) or Column Shift (CS) mode.


Whether to display a fixed COLS line at top of screen.


The code page used for the character set collating sequence


The End of Line delimiter type used.  e.g. CR, CRLF, etc.


Whether lower-case letters are displayed as if upper-case


Whether HEX editing mode should be used as a default for the file type.


Whether to use automatic colorization support, and FIND / CHANGE highlighting.


The logical record length for fixed length record types.


The current column MARK settings.


The current model MASK line


The minimum logical record length


Whether to use PAGE mode for EOL AUTO or EOL AUTONL files


Whether to retain trailing blanks on text lines or not.


The record format of the file.


The default scroll amount for UP / DOWN / LEFT / RIGHT commands.


The number of UNDO levels to maintain.


The data encoding used by the data (ANSI, UTF8, EBCDIC, etc.)


The default positioning of a file when opened.


Whether persistent STATE information is retained for this file type


The unique SUBARG value for use during SUBMIT processing.


The SUBCMD value for use during SUBMIT processing.


The TABS On/Off setting; the ==TABS> line value specifies the actual Tab locations.


The current set of valid WORD characters.


The default tab spacing if loading files with embedded Tab characters.

Each of the above settings can be altered in either of two ways:

Note: The BNDS, WORD, MARK and TABS line values are modified by altering the model line that are displayed. These model lines appear when you issue a PROFILE primary command, or on demand by using the BNDS, WORD, MARK and TABS line commands.

Automatic Colorization linkage

If you utilize Automatic Colorization Files, the name of the colorization control file is derived from the name of the Profile or the name of the USING parameter for the Profile (see Profile Using, below).

Managing changes to a Profile

Profiles values can be critical to proper edit processing and it is prudent to protect these settings from being altered inadvertently.   Here are some tools to assist you:

Profile display

It is often necessary to display the current Profile.  This can be done while editing a file of the type involved, by entering the PROFILE command (without any extra operands) and pressing Enter.  SPFLite will insert a series of lines into the display as follows:

This display shows you the current values for all profile settings.

Profile locking

If you look at the first =PROF> line above, you will notice the word UNLOCKED.   This means that any changes you make to profile values will be automatically saved.  If the value had shown as LOCKED, then no changes to the Profile would be saved while the Profile is LOCKED.  Any of the displayed values can be altered for the duration of this edit session using the various profile-modifying commands, but the changes would not be permanently stored.

A profile can be locked once you have a set of values you wish to keep by issuing the PROFILE LOCK command.  Similarly, if you want to alter one of a locked Profile's settings permanently, you must issue a PROFILE UNLOCK command first, make your change, and then issue a PROFILE LOCK command to retain the lock going forward.

Note that if the profile is LOCKED, the lock prevents it from being permanently altered.  The lock does not prevent its settings from being temporarily altered during the course of an edit session.  Those alterations simply won't be saved.

The keywords LOCKED and UNLOCKED can also be spelled as LOCK and UNLOCK.

Profile USING

You may need to work with different file types that all have a common format.  For example a programming language may use different file types for main programs, header files, include files, macro files etc. but may all be of the same format and must be treated the same.

Since SPFLite would ordinarily treat all these different file types as independent Profiles, it would make changing a given profile option a problem, because the change would have to be made to each of the different file profiles.  This is a time-consuming and error-prone process.

SPFLite allows a Profile USING option which allows one Profile to reference another Profile's settings.  So how does that help?

Say we have a source language like C (.C) which also has associated header files (.H).  All that needs to happen is to create and customize the C Profile as you desire.  We can refer to this profile as the 'master' profile. Then, in the Profile for H you issue a PROF USING C command to refer to the 'master profile' and the H Profile will inherit all the settings from the C Profile, such as the C colorization file if automatic colorization support is active.   Now, only changes need to be make to the C profile, and all profiles which are USING the C profile will automatically reference the new settings in C.

When you are editing a file which is USING another 'master' profile, and the master profile is UNLOCKED, then any changes you make will be saved in the master profile, meaning they will apply in the future to all file types which use the master profile.

The USING keyword can also be spelled as USE.

Copying Profile settings

If you find yourself editing a file type for the first time, you may realize that a number of settings that must be customized for this new type are just like another file type which you have already defined.  You can quickly copy all the settings from another profile with the PROFILE COPY xxxx command.   The other profile's settings will replace the one in the current profile.  A PROFILE COPY operation is a one-time event.  

When you COPY another profile, the settings of the two profiles are completely independent of each other; a subsequent modification of one of the profiles has no effect on the other profile.  This is different than a PROFILE USING situation, where one profile is linked to another.

Profiles and the FF (Find in Files) Command

The FF (Find in Files) command in File Manager will search all displayed filenames for your requested string.  Since SPFLite supports a wide variety of file data formats (ASCII, EBCDIC, etc.), the FF command requires a File Profile to exist for all the files it is searching so that it can properly read the data for the search.

However, a displayed list of files may contain other file formats which are never edited by SPFLite.   If you are aware of these ahead of time, you can specify specific file types for exemption by the FF command.  (See Options -> File Manager)

Many times though, files slip through this process and trigger a pop-up during the FF search when it encounters an unknown file type.  You will see the following displayed:

This example was triggered by a .tta file type.   At this point you can choose one of the 5 options.

Created with the Personal Edition of HelpNDoc: Free iPhone documentation generator