Restore previous input
Component: | SDF |
Functional area: | SDF control |
Domain: | SDF |
Privileges: | STD-PROCESSING |
Function
The RESTORE-SDF-INPUT command redisplays an input which has already been made and stored in the input buffer. The user can then use the displayed command or statement again as it is or in modified form without having to retype it. For an input to be reused, however, at least one character in the input string must be changed (e.g. you can overwrite a character with the same character).
The INPUT operand is used to select the input to be displayed. The default *LAST-CMD recalls the last saved command. Earlier inputs can be selected using the relative or absolute input serial number. The SHOW-INPUT-HISTORY command (or standard statement) provides information on all saved (and therefore available) inputs.
The output produced by RESTORE-SDF-INPUT depends on the current guidance mode (see SHOW-SDF-OPTIONS command, output field GUIDANCE):
In guided dialog a temporarily guided dialog is initiated for the command or statement that is to be output. The operand form contains all user inputs.
A guided dialog is not possible for commands or statements without operands. Therefore, only the help text and the error message CMD0070 are displayed. If you select an AID command, the warning CMD0559 is output because AID commands are not supported in guided dialog.In unguided dialog the saved input string is displayed. To use dialog guidance for making modifications, the user can initiate a temporarily guided dialog by entering a question mark directly after the command/statement name.
The input buffer is controlled (activated/deactivated and deleted) via the MODIFY-SDF-OPTIONS command (or standard statement). Inputs in guided dialog are saved in ACCEPTED form, while inputs in unguided dialog are saved in INPUT form.
The RESTORE-SDF-INPUT command or statement is not saved.
Values specified for “secret” operands which match neither the default value nor a value defined via SECRET=*NO are saved in the input buffer with “^”.
If these values are displayed again via RESTORE-SDF-INPUT in unguided dialog, the user can do one of the following:
send off the command/statement unchanged. In this case, SDF displays a blanked input field for each secret operand for the user to enter the desired value.
delete the “^” and insert the desired value directly before sending off the command/statement.
In programs with an SDF interface, RESTORE-SDF-INPUT is available as a standard statement with approximately the same syntax and functionality.
Format
RESTORE-SDF-INPUT | Alias: RRSDFI |
INPUT = *LAST-CMD / <integer -100..-1> / <integer 1..9999> |
Operands
INPUT = *LAST-CMD / <integer -100..-1> / <integer 1..9999>
Determines which input from the input buffer is to be redisplayed.
INPUT = *LAST-CMD
The last saved command is displayed.
INPUT = <integer -100..-1>
Identifies the desired input relative to the current input.
INPUT = <integer 1..9999>
Identifies the desired input absolutely via its input serial number, which is automatically assigned by SDF when it is saved. The contents of the input buffer can be displayed with input serial numbers (see SHOW-INPUT-HISTORY command, operand INPUT-SERIAL-NUMBER=*YES).
Return codes
(SC2) | SC1 | Maincode | Meaning/Guaranteed messages |
---|---|---|---|
0 | CMD0001 | Command executed without errors | |
1 | 0 | CMD0001 | Output is not possible since the input buffer is empty. |
2 | 0 | CMD0559 | AID command not supported in guided dialog. |
1 | 32 | CMD0500 | Syntax description in current syntax file invalid. |
1 | 64 | CMD0558 | Command execution not successful |
Example
/mod-f-attr sf.dummy,prot=(basic-acl=(owner=(y,y,y),group=(y,n,n),
others=(y,n,n))) ————————————————— (1)
/show-job-sta job-id=tsn(00as),inf=*envir ———————————————————————————— (2)
% EXC0755 INFORMATION ON TASK WITH (&00) '00AS' CANNOT BE GIVEN
/restore-sdf (3)
/show-job-sta job-id=tsn(00ad),inf=*envir (4)
%NAME TSN STATION PROCESSOR HOLD MRSCAT %RALF 00AD $$$01121 BGDW0121
/cre-file test ——————————————————————————————————————————————————— (5)
/show-file-attr test,inf=*min
%N NNN NW 3 :1OSN:$SDFUSER.TEST
/show-input i-s-n=y
————————————————————————————— (6)
/" 43 :" sh-sdf *u /" 44 :" show-job-sta /" 45 :" mod-f-attr sf.dummy,prot=(basic-acl=(owner=(y,y,y),group=(y,n,n), others=(y,n,n))) /" 46 :" show-job-sta job-id=tsn(00as),inf=*envir /" 47 :" show-job-sta job-id=tsn(00ad),inf=*envir /" 48 :" cre-file test /" 49 :" show-file-attr test,inf=*min
/restore-sdf 45 ——————————————————————————————————————————————————— (7)
/mod-f-attr test ,prot=(basic-acl=(owner=(y,y,y),group=(y,n,n), others=(y,n,n))) ————————————————— (8)
/restore-sdf
/mod-f-attr?test ,prot=(basic-acl=(owner=(y,y,y),group=(y,n,n),
others=(y,n,n))) ———————————————— (9)
COMMAND : MODIFY-FILE-ATTRIBUTES OPERANDS : ...AME=TEST,PROTECTION=*PARAMETERS(BASIC-ACL=*PARAMETERS(OWNER=*PARAM ETERS(READ=*YES,WRITE=*YES,EXEC=*YES),GROUP=*PARAMETERS(READ=*YES, WRITE=*YES,EXEC=*NO),OTHERS=*PARAMETERS(READ=*YES,WRITE=*YES,EXEC=... -------------------------------------------------------------------------------- FILE-NAME = TEST NEW-NAME = *SAME SUPPORT = *UNCHANGED PROTECTION = (PROTECTION-ATTR=*UNCHANGED,ACCESS=*BY-PROTECTION-ATTR,US ER-ACCESS=*BY-PROTECTION-ATTR,BASIC-ACL=(OWNER=(READ=Y,WR ITE=Y,EXEC=Y),GROUP=(READ=Y,WRITE=Y,EXEC=N),OTHERS=(READ= Y,WRITE=Y,EXEC=N)),GUARDS=*BY-PROTECTION-ATTR,WRITE-PASSW ORD=*BY-PROT-ATTR-OR-UNCH,READ-PASSWORD=*BY-PROT-ATTR-OR- UNCH,EXEC-PASSWORD=*BY-PROT-ATTR-OR-UNCH,DESTROY-BY-DELET E=*BY-PROTECTION-ATTR,AUDIT=*UNCHANGED,SPACE-RELEASE-LOCK =*BY-PROTECTION-ATTR,EXPIRATION-DATE=*BY-PROTECTION-ATTR, FREE-FOR-DELETION=*BY-PROT-ATTR-OR-UNCH) -------------------------------------------------------------------------------- NEXT = *down(basic-acl) *EXECUTE"F3" / + / Next-cmd / *CONTINUE / *EXIT"K1" / *EXIT-ALL"F1" / *TEST"F2"
COMMAND : MODIFY-FILE-ATTRIBUTES STRUCTURE: BASIC-ACL= OPERANDS : ...AME=TEST,PROTECTION=*PARAMETERS(BASIC-ACL=*PARAMETERS(OWNER=*PARAM ETERS(READ=*YES,WRITE=*YES,EXEC=*YES),GROUP=*PARAMETERS(READ=*YES, WRITE=*YES,EXEC=*NO),OTHERS=*PARAMETERS(READ=*YES,WRITE=*YES,EXEC=... -------------------------------------------------------------------------------- OWNER = (READ=Y,WRITE=Y,EXEC=Y) GROUP = (READ=Y,WRITE=N,EXEC=y) OTHERS = (READ=Y,WRITE=N,EXEC=y) -------------------------------------------------------------------------------- NEXT = *CONTINUE *EXECUTE"F3" / + / - / Next-cmd / *CONTINUE / *EXIT"K1" / *EXIT-ALL"F1" / *TEST"F2"
(1) | BASIC-ACL protection is recorded in the catalog entry for the SF.DUMMY file (owners have unrestricted rights, groups and others have only read access). |
(2) | The SHOW-JOB-STATUS command is supposed to display information on the task with the TSN 00AS, but no such task exists. |
(3) | The RESTORE-SDF-INPUT command has to redisplay the last input. |
(4) | The SHOW-JOB-STATUS command (see step 2) is output. In the character string which is output, the TSN is corrected to 00AD and sent off with [DUE]. Information on this TSN is displayed. |
(5) | The |
(6) | SHOW-INPUT-HISTORY outputs the contents of the input buffer with input serial numbers (INPUT-SERIAL-NUMBER=*YES). |
(7) | RESTORE-SDF-INPUT redisplays the command with the serial number 45. |
(8) | In the displayed MODIFY-FILE-ATTRIBUTES, the file name is changed to TEST and sent off with [DUE]. The |
(9) | The user wants to change the protection attributes of the |
(10) | SDF switches to temporarily guided dialog and displays the operand form of the MODIFY-FILE-ATTRIBUTES command with the explicitly set specifications for BASIC-ACL. For an overview of the input, the user requests the subform for BASIC-ACL (*PARAMETERS structure) be entering “*down(basic-acl)” in the NEXT line. |
(11) | The user enters the desired values (groups and others receive execution rights with EXEC=*YES) in the subform and sends it off with [DUE]. |
Note
The BASIC-ACL access rights can be changed to the shortest possible form by editing the command line output by RESTORE-SDF-INPUT (or by editing the corresponding command line in the output of the SHOW-INPUT-HISTORY command).