Вы находитесь на странице: 1из 4

ISPF COMMANDS Command Function < Data shift left shifts a single line of program source code to the

left without affecting the pr ogram labels or comment ie. data from column one to the first blank and data fol lowing several blanks are not moved. May be specified with a number identifying the distance to move (default 2). << Block data shift left All of the lines in the block are affected as if you typed individual data shift left commands. May be specified with a number identifying the distance to move (default 2). > Data shift right As for data shift left but the opposite direction. May be specified with a numbe r identifying the distance to move (default 2). >> Block data shift right ( Column shift left Works similarly to data shift left but moves everything within the bounds, nothi ng stays fixed in place. May be specified with a number identifying the distance to move (default 2). (( Block column shift left ) Column shift right )) Block column shift right a After used with copy, move, or paste to specify the line after which the copied/moved lines are to be inserted. b Before used with copy, move, or paste to specify the line before which the copied/moved lines are to be inserted. bnds Display bounds above this line Displays the current boundary positions which can be changed by tying < and > in the new boundary positions that you require. c Copy Copies this line either to another place within the current file (using a, b, or o to identify destination) or to another file (using the create, replace, or cu t commands). Can be specified with a number to indicate that multiple lines are to be copied. cc Block copy cols Display the column ruler above this line d Delete Deletes this line from the file. Can be specified with a number to indicate that following lines are also to be deleted. dd Block delete f Display the first excluded line Can be specified with a number to display more than one excluded lines. This com

mand is only valid on excluded lines. i Insert a new line after this one Can be specified with a number to insert multiple lines. l Display the last excluded line Can be specified with a number to display more than one excluded lines. This com mand is only valid on excluded lines. lc Convert all text on this line to lower case Can be specified with a number to convert more than one line to lower case. lcc Block convert to lower case m Move Works the same as copy except that the lines are removed from their current loca tion. mm Block move mask Display the mask line above this one The mask defines the default content for inserted lines. o Overlay (used with copy and move to specify the line into which the copied/mov ed line is to be inserted - only spaces are replaced). Can be specified with a n umber to indicate that following lines are also to be overlaid. oo Block overlay (the lines to be copied/moved are inserted into the block as ma ny times as they will fit) r Repeat - create a duplicate of this line Can be specified with a number to indicate that additional duplicate lines are t o be produced. rr Block repeat Can be specified with a number to indicate that multiple duplicates of the block are to be produced. s Show the excluded line that has the least indentation Can be specified with a number to display more than one excluded lines. When mul tiple lines are displayed they may not be together. This command is only valid o n excluded lines. tabs Show the tab settings above this line Hardware tabs positions are indicated by asterisks (*) and software tabs by hyph ens (-) or underscores (_). te Text Entry mode - allows bulk insert following this line You can start entering data without paying any attention to lines as the text wi ll wrap automatically. Press the enter key to exit from text entry mode. tf Text flow - flows the text between the margins for this line and following li nes until a blank line is found, the indentation changes, or a special character (period, colon, ampersand, less than, or form feed) is found in the first colum n. tj Text Join - merges this line with the following one ts Text split - splits this line in two You need to position the cursor at the position on the line where you want the s

plit to occur. uc Convert all text on this line to upper case Can be specified with a number to convert multiple lines. ucc Block convert to upper case x Exclude this line from the display Can be specified with a number to exclude multiple lines. This command is useful when you need to view two blocks of data that are in different locations within the file, just exclude the intervening data from the display. xx Block exclude . label assignment You can assign a label to any non-excluded line by typing a period followed by t he label name. The label can then be used to identify the line in primary comman ds. You cannot start labels with "z" as these labels are reserved for system use .

Moving a Line The line commands to move a line within the text are similar in operation to the copy commands. The principle difference is that while copy leaves the source li ne intact, move removes the old source line leaving only the new line at the des tination. The move is accomplished by marking the source line, type m in the lin e numbers on the source line, then marking the destination with a or b just as w e did with the copy command. The command is executed when you press ENTER. This is illustrated below. 000100 m00200 000300 000400 000500 a00600 000700 IDENTIFICATION DIVISION. PROGRAM-ID. EXAMPLE1. AUTHOR. JENNIFER STUDENT. INSTALLATION. UNIVERSITY OF OKLAHOMA. DATE-WRITTEN. AUGUST 8, 1997. DATE-COMPILED.

The result of this operation is illustrated on the next page. 000100 000300 000400 000500 000600 000610 000700 IDENTIFICATION DIVISION. AUTHOR. JENNIFER STUDENT. INSTALLATION. UNIVERSITY OF OKLAHOMA. DATE-WRITTEN. AUGUST 8, 1997. DATE-COMPILED. PROGRAM-ID. EXAMPLE1.

programes $ SET SOURCEFORMAT"FREE" IDENTIFICATION DIVISION.

PROGRAM-ID. AcceptAndDisplay. AUTHOR. Michael Coughlan. * Uses the ACCEPT and DISPLAY verbs to accept a student record * from the user and display some of the fields. Also shows how * the ACCEPT may be used to get the system date and time. * * * * * The YYYYMMDD in "ACCEPT CurrentDate FROM DATE YYYYMMDD." is a format command that ensures that the date contains a 4 digit year. If not used, the year supplied by the system will only contain two digits which may cause a problem in the year 2000.

DATA DIVISION. WORKING-STORAGE SECTION. 01 StudentDetails. 02 StudentId PIC 02 StudentName. 03 Surname PIC 03 Initials PIC 02 CourseCode PIC 02 Gender PIC * YYMMDD 01 CurrentDate. 02 CurrentYear 02 CurrentMonth 02 CurrentDay * YYDDD 01 DayOfYear. 02 FILLER 02 YearDay

9(7). X(8). XX. X(4). X.

PIC 9(4). PIC 99. PIC 99.

PIC 9(4). PIC 9(3).

* HHMMSSss s = S/100 01 CurrentTime. 02 CurrentHour PIC 99. 02 CurrentMinute PIC 99. 02 FILLER PIC 9(4). PROCEDURE DIVISION. Begin. DISPLAY "Enter student details using template below". DISPLAY "Enter - ID,Surname,Initials,CourseCode,Gender". DISPLAY "SSSSSSSNNNNNNNNIICCCCG". ACCEPT StudentDetails. ACCEPT CurrentDate FROM DATE YYYYMMDD. ACCEPT DayOfYear FROM DAY YYYYDDD. ACCEPT CurrentTime FROM TIME. DISPLAY "Name is ", Initials SPACE Surname. DISPLAY "Date is " CurrentDay SPACE CurrentMonth SPACE CurrentYear. DISPLAY "Today is day " YearDay " of the year". DISPLAY "The time is " CurrentHour ":" CurrentMinute. STOP RUN.

Вам также может понравиться