SEU to Edit RPG Source Code

Using SEU to edit some RPG Source Code

and playing with various COPY, MOVE, AFTER/BEFORE, BLOCK commands... and more:

SEU Line commands

Similarly you can have number of SEU Line commands to perform various operations. Following is a list of valid commands.

  • A=After Move or copy records after this record.
  • An=After with repeat n times Move or copy records after this record and repeat these records n times.
  • B=Before Move or copy records before this record.
  • Bn=Before with repeat n times Move or copy records before this record and repeat these records n times.
  • C=Copy Line Copy this line to a specified target.
  • Cn=Copy n lines Copy this line plus the next n-1 lines to the specified target.
  • CC=Block Copy Copy all lines between the boundaries formed by the two CC commands.
  • CR=Copy records and retain command Copy this record to the specified targets and keep this command on the display.
  • CRn=Copy n records and retain command. Copy n records to the specified targets and keep this command on the display.
  • CCR=Copy block records and retain command Copy the block of records defined by a pair of CCR commands to the specified targets and keep this command on the display.
  • D=Delete Delete the current line.
  • Dn=Delete n lines Delete the current line and the next n-1 lines.
  • DD=Block Delete Delete all lines between the two DD boundaries.
  • F=Display format line.
  • I=Insert a line Insert a blank line after the current record.
  • In=Insert n lines Insert n blank lines after this record.
  • IP=Insert line and prompt Insert a blank line and display the line in a prompt.
  • L=Shift data 1 char left Shift data in this record one character position to the left without losing data.
  • Ln=Shift data n chars left Shift data in this record n character positions to the left without losing data.
  • LL=Shift block 1 char to the left Shift data defined by the boundary between and including the two LL line commands one character position to the left without losing data.
  • LLn=Shift block n chars to the left Shift data defined by the boundary between and including the LLn and LL line commands n character positions to the left.
  • M=Move a line Move a line to a specified target.
  • Mn=Move n lines Move the current line and the following n-1 lines to a specified target.
  • MM=Block Move Move all records between and including the boundaries defined by the MM line commands to a specified target.
  • O=Overlay Overlay the current line with the first line defined by the move, copy, or copy repeated line command.
  • On=Overlay n lines Overlay this line and the following n-1 lines with the first n lines defined by the move, copy, or copy repeated line command.
  • OO=Block overlay Overlay all the records between and including the boundaries defined by two OO line commands with the lines defined by the move, copy, or copy repeated line command.
  • P=Display prompt Type P to display this line in a prompt.
  • R=Shift data 1 char right Shift data in the current record one character position to the right without losing data.
  • Rn=Shift data n chars right Shift data in the current record n character positions to the right without losing data.
  • RR=Block shift 1 char to the right Shift data defined by the boundary between and including the two RR line commands one character position to the right without losing data.
  • RRn=Block shift n chars to the right Shift data defined by the boundary between and including the RRn and RR line commands n character positions to the right, without losing data.
  • RP=Repeat line Repeat the current line once before the following line.
  • RPn=Repeat line n times Repeat the current line n times before the following line.
  • RPP=Block repeat Repeat all lines defined by the boundary between the two RPP line commands.
  • RPPn=Block repeat Repeat all lines defined by the boundary between the two RPP line commands n times.
  • SF=Show first record Show the first record of the exclude group.
  • SFn=Show first n records Show the first n records of the exclude group.
  • SL=Show last record Show the last record of the exclude group.
  • SLn=Show last n records Show the last n records of the exclude group.
  • W=Display member from column 1 Display the member beginning in column 1.
  • Wn=Display member from column n Display the member beginning in column n.
  • X=Exclude Exclude the current record from the display.
  • Xn=Exclude plus Exclude the the current record and the next n-1 records.
  • XX=Block Exclude Exclude all lines between the boundaries formed by the two XX line commands.
  • + (plus sign)=Roll member forward 1 line Roll the member forward one line.
  • +n=Roll member forward n lines Roll the member forward n lines.
  • – (minus sign)=Roll member backward 1 line Roll the member backward one line.
  • -n=Roll member backward n lines Roll the member backward n lines.
  • n=Absolute Positioning Position the line identified by the sequence number(n) as the first record on the display.

SEU Commands

SEU commands are entered in the “SEU==>” field at the top of the screen.

FIND

Search for an occurrence of a character string. If the string contains embedded blanks, apostrophes, or quotation marks, it should be enclosed in quotation marks. Several direction parameters are available: N (Next), P (Previous), F (First), L (Last), and A (All). The scope of the search can be specified using search parameters: X (excluded records) and NX (non-excluded records). The syntax of FIND is FIND string [N,P,A,F,L] [X,NX] [column parameter]Examples:

  • F XYZ
  • F ‘hello there’
  • F *ERR A find all syntax errors
  • F “‘XYZ'”

Use the F16 “Repeat Find” key to find the next occurrence of a string.

CHANGE

Find all occurrences of a character string and replace it with another string. The syntax is CHANGE fstring cstring [N,P,A,F,L] [X,NX] [column parameter]

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>