REFORMAT allows the user under PDF EDIT to move columns around. Frequently material is available somewhere in our system, but the columns are not as desired.
REFORMAT can be a very useful tool when doing documentation or when preparing data within a PDS member.
REFORMAT takes advantage of REXX string handling of hex strings C2X(), X2C() and the ability to strip trailing blanks strip(name,"T").
lptr-range indicates that two line pointers are required to indicate a range of lines to be deleted. The line pointers must be a labels. Specifying one line pointer is invalid.
NX Affects only lines that are NOT EXCLUDED from the display Option X for excluded lines only is not permitted.
INIT Use only within an edit macro that will be used as an INITIAL macro. The use of ISREDIT UP 4 for example is not allowed within an INITIAL macro.
col-pair A pair of columns is required. Specification of a single column only will terminate the edit macro before reformatting proceeds. If 0 (zero) is used for the starting column then the second number is used to indicate the number of blanks (150 max). An L can generally be used to indicate the last column of data in the record. Unavailable for use with UNHEX.
HEX col-pair The pair of columns or additional pair will be converted from a character string to a hex display. Uses REXX function X2C( ).
UNHEX col-pair The pair of columns or additional pair will be converted from hex representation back to character. Uses REXX function C2X( ). The two columns in the column pair that follows must add up to an odd number, because each representation of a byte requires two HEX digits.
M col-pair The card at label .MSK will be used to provide constant string information based on the column pair that follows. The MASK option (M) may be used in combination with the STRIP option (S). .MSK provides a pattern card that can simplify usage.
N col-pair Will create name.ext from name ext preserving the original area of the col pair. Of use in a DIR *.* list which separate name from ext. Note this option appears only in the SPF/PC version and not in the MVS version.
NODE(n,col-pair) -- not coded yet -- Extract node number n from col-pair. Leading and trailing blanks are removed first. A node will be an entity separated by any of the following characters period (.), double/single quote. If a slash (/) or backslash (/) is found the search will start after the last one found.
LC s col-pair Option used in conjunction with a col-pair, to convert to uppercase. May be used in conjunction with options S, N, node(node,from,to). SPF/PC version only can easily be integrated into TSO version.
LC s col-pair Option used in conjunction with a col-pair, to convert to upercase. May be used in conjunction with options S, N, node(node,from,to). SPF/PC version only can easily be integrated into TSO version.
S col-pair The field defined by the following column pair will be stripped of trailing blanks.
'constant' a constant string is optional. The constant must be enclosed within single or double quotes and may include blanks. Any number of double quotes may be included within single quotes, or any number of single quotes may be included within double quotes.
TEST The test option will not actually change the data but will allow you to preview what the changes would be by generating INFOLINEs. An INFOLINE is scrollable left and right unlike a NOTELINE. SPF/PC<R> users are stuck with NOTELINE for the present.
The fourth example reformats lines labeled .refa through .refb such that each reformatted line begins with 40 blank positions followed by the former contents of pos. 40-45. In effect as entered this command blanks out columns 1-40 and columns 51 through the end of the record.
reformat 3 21 "c'" s 21 28 "'"
The fifth example reformats all lines using the strip (S) option so that a "name" can be enclosed in singles quotes and not simply be eight characters (col 21-28).
The sixth example reformats using the mask (M) option. This makes entry of strings easier if they are already found on a card which can be used as a pattern mask.
.MSK "receive c:\spfmacro\WORDS.spf a:'is03.spf2.macros(WORDS)'ascii crlf"
.A "receive c:\spfmacro\CSON.spf a:'is03.spf2.macros(CSON)' ascii crlf"
000175 "receive c:\spfmacro\EOL.spf a:'is03.spf2.macros(EOL)' ascii crlf"
000176 "receive c:\spfmacro\FLOC.spf a:'is03.spf2.macros(FLOC)' ascii crlf"
.B "receive c:\spfmacro\PASTER.spf a:'is03.spf2.macros(PASTER)'ascii crlf"
(&C -- denotes repeat use of Change as necessary).
It would be wise to save your data before invoking the REFORMAT edit macro, just like you should consider when using the SORT command in PDF EDIT.
000006 09 : 'IS03.SHARE.TEXT(HPPRT)' -- December 29th, 1993 10:55 a.m.
Checks that no labels or exactly two labels appear in operandlist, the use of ENTIRE is same as if .ZFIRST and .ZLAST were included.
Other features checked for NX HEX UNHEX.
Column pairs will be checked such that the second column must be higher than the first. At least one column pair must exist.
A command is created (string) for later execution from the above features. This saves a lot of time later. Reformatting takes place for all lines within range using INTERPRET string taking full advantage of REXX.
The current page describes the REFORMAT macro. If you would like some additional examples of situations using REFORMAT then check out REFORMAT Examples.