Assign SYSDTA to input source
Component: | SYSFILE |
Functional area: | Job processing |
Domain: | JOB |
Privileges: | STD-PROCESSING |
Function
The ASSIGN-SYSDTA command assigns the system (input) file SYSDTA to an input source. The primary assignment and attributes of SYSDTA are described in section "System files".
Restrictions
Allocating a system file to a variable with TO=*VARIABLE(...) is only possible if the chargeable subsystem SDF-P is loaded.
Format
ASSIGN-SYSDTA | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Operands
TO =
Input source to which SYSDTA is to be assigned.
TO = <filename 1..54>
Name of the file to which SYSDTA is to be assigned. The file must be cataloged with the following attributes:
variable-length records
SAM or ISAM access method
start of ISAM key: byte 5
length of ISAM key: 8 bytes
TO = *VARIABLE(...)
Name of a complex S variable of the “list” type (i.e. a series of elements of the same variable type which can only be accessed sequentially). Complex S variables can only be used if the chargeable subsystem SDF-P is loaded (see the “SDF-P” manual [34]). The command will be rejected if the specified list has not been declared or if the list elements are not of variable type STRING (or ANY).
VARIABLE-NAME = <composed-name 1..254>
Name of the S variable.
TO = *LIBRARY-ELEMENT(...)
The input source is a PLAM library element.
LIBRARY = <filename 1..54 without-gen-vers>
Name of a PLAM library.
ELEMENT = <composed-name 1..64 with-under>(...)
Name of an element in the specified library. Hyphens are also permitted. However, hyphens are not permitted as the last character.
VERSION = *HIGHEST-EXISTING / *STD / <composed-name 1..24>
Addition of the version to the element name. The default value is the latest version of the specified element.
TYPE = S / <alphanum-name 1..8>
Type of the element.
S | Element type S (source program); default value. |
D | Element type D (text data) |
M | Element type M (macro) |
TO = *PRIMARY
Resets SYSDTA to the primary assignment (see section "System files").
TO = *SYSCMD
Combines SYSDTA and SYSCMD, i.e. the system reads both commands and data via SYSCMD.
DATA-ESCAPE-CHAR =
This specifies whether variables are to be replaced in data records.
DATA-ESCAPE-CHAR = *COMPATIBLE
The replacement of variables and expressions in data records is to be performed in compatible fashion with the previous behavior:
When the assignment SYSDTA not equal to SYSCMD is made, no replacement takes place in data records
When SYSDTA=SYSCMD, replacement takes place in data records as defined in the SET-PROCEDURE-OPTIONS, MODIFY-PROCEDURE-OPTIONS or BEGIN-PROCECURE command.
DATA-ESCAPE-CHAR = ’&&’ / ’#’ / ’*’ / ’@’ / ’$’ / *STD
This specification is possible only with the assignment SYSDTA not equal to SYSCMD. In the case of TO=*SYSCMD or TO=*PRIMARY, the specification is rejected.
In data records, variables and expressions which begin with the specified character are to be replaced. Permissible characters are &, #, *, @ and $. Specifying & is equivalent to specifying *STD (as on command level). If the character & is to be specified explicitly, it must be entered twice.
Return codes
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
0 | CMD0001 | Command executed | |
2 | 0 | SSM3200 | Command executed with warning |
2 | 0 | SSM3034 | The system file is already assigned to *PRIMARY |
1 | SSM2036 | Operand invalid | |
32 | SSM1013 | System error during command execution | |
64 | SSM1025 | Floppy disk device not available | |
64 | SSM1026 | Floppy disk device not available or the floppy disk could not be mounted | |
64 | SSM2061 | Error on accessing PLAM library element | |
64 | SSM2064 | System file cannot be assigned via RFA | |
64 | SSM3030 | SYSDTA is already assigned to floppy disk | |
64 | SSM3031 | Semantic error | |
64 | SSM3055 | Invalid record or file format | |
64 | SSM3056 | OPEN error on input (DMS error is contained as in the insertion into the SYSOUT message) | |
64 | SSM3100 | S variable does not exist | |
64 | SSM3101 | S variable not of list type | |
64 | SSM3102 | SDF-P subsystem not available | |
64 | SSM3104 | DATA-ESCAPE-CHAR not equal to *COMPATIBLE not permitted when SYSDTA=SYSCMD | |
64 | SSM3105 | Specification of DATA-ESCAPE-CHAR not valid in the current software configuration | |
64 | SSM3200 | Error on accessing PLAM library or element | |
65 | SSM2074 | SPOOL subsystem not loaded; a floppy disk device cannot be accessed |
Notes
Only one file may be assigned with one ASSIGN-SYSDTA command. Users wishing to assign more files must enter a corresponding number of ASSIGN-SYSDTA commands.
At the procedure level, the system file SYSDTA is no longer assigned when the end of the file has been reached. Any further reading results in the message “
SYSDTA NOT ASSIGNED
”. When processing returns to a lower procedure level, SYSDTA is assigned to the device that was defined at that lower level.The replacement of variables, which is defined in the DATA-ESCAPE-CHAR operand for SYSDTA not equal to SYSCMD is restricted to S procedures.
The following applies for this setting:
When data in the context of a non-S procedure or ENTER file is read, the read operation is rejected with message SSM3106.
If an error occurs while variables are being replaced, the data record is rejected, and reading from the input source is terminated with EOF.
If the primary allocation is switched to while reading from the input source (file, library member or S variable), no variables are replaced (e.g. EDT switches to primary allocation after EOF occurs).
Examples
Example 1
/start-assembh ————————————————————————————————————————————————————— (1)
% BLS0523 ELEMENT 'ASSEMBH', VERSION '013', TYPE 'C' FROM LIBRARY ':1OSH:$TSOS. SYSPRG.ASSEMBH.013' IN PROCESS % BLS0500 PROGRAM 'ASSEMBH', VERSION '01.3A02' OF '2012-04-04' LOADED % BLS0552 COPYRIGHT (C) FUJITSU TECHNOLOGY SOLUTIONS 2012. ALL RIGHTS RESERVED % ASS6010 V01.3A02 OF BS2000 ASSEMBH READY % //compile source=*sysdta,... . . . % ASS6012 END OF ASSTRAN
/assign-sysdta to=src.testprog —————————————————————————————————————— (2)
/start-assembh
% BLS0523 ELEMENT 'ASSEMBH', VERSION '013', TYPE 'C' FROM LIBRARY ':1OSH:$TSOS. SYSPRG.ASSEMBH.013' IN PROCESS % BLS0500 PROGRAM 'ASSEMBH', VERSION '01.3A02' OF '2012-04-04' LOADED % BLS0552 COPYRIGHT (C) FUJITSU TECHNOLOGY SOLUTIONS 2012. ALL RIGHTS RESERVED % ASS6010 V01.3A02 OF BS2000 ASSEMBH READY % ASS6011 ASSEMBLY TIME: 385 MSEC % ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES % ASS6019 HIGHEST ERROR-WEIGHT: WARNING % ASS6006 LISTING GENERATOR TIME: 121 MSEC % ASS6012 END OF ASSEMBH
/assign-sysdta to=*primary —————————————————————————————————————————— (3)
(1) | The system file SYSDTA has primary assignment. The assembler reads its input from the terminal. |
(2) | SYSDTA is assigned to the file SRC.TESTPROG. The assembler reads its input from this file (COMPILE statement and source program if SOURCE=*SYSDTA is declared in the COMPILE statement). |
(3) | The primary assignment is returned to SYSDTA. |
Example 2
/assign-sysdta to=*lib-elem(lib=biblio,elem=testprog)
/start-assembh
% BLS0523 ELEMENT 'ASSEMBH', VERSION '013', TYPE 'C' FROM LIBRARY ':1OSH:$TSOS. SYSPRG.ASSEMBH.013' IN PROCESS % BLS0500 PROGRAM 'ASSEMBH', VERSION '01.3A10' OF '2012-10-11' LOADED % BLS0552 COPYRIGHT (C) FUJITSU TECHNOLOGY SOLUTIONS 2012. ALL RIGHTS RESERVED % ASS6010 V01.3A10 OF BS2000 ASSEMBH READY % ASS6011 ASSEMBLY TIME: 429 MSEC % ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES % ASS6019 HIGHEST ERROR-WEIGHT: WARNING % ASS6006 LISTING GENERATOR TIME: 154 MSEC % ASS6012 END OF ASSEMBH
/assign-sysdta to=*primary
The assembler reads its input from the element TESTPROG from the library file BIBLIO. After the compiler run has been completed, SYSDTA once more obtains the primary assignment.
Example 3
/BEG-PROC LOG=*ALL, PAR=*YES(PROC-PAR=(&INFILE1,&OUTFILE,&INFILE2,&SFID)) /ASS-SYSDTA TO=*SYSCMD /START-SDF-I OPEN INPUT-FILE=&INFILE1, OUTPUT-FILE=&OUTFILE MERGE FILE=&INFILE2, REMOVE-ID=&SFID END /END-PROC
Because of the ASSIGN-SYSDTA command, when the non-S procedure executes SYSDTA, like SYSCMD, is contained in the file in which the procedure is stored. This then also enables the SDF-I utility to read the statements from this procedure file.