Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SYSDTA( ) Request SYSDTA assignment

&pagelevel(3)&pagelevel

Domain: SYSFILE information

The SYSDTA( ) function supplies the name of the file (alternative: a library element or a list variable) assigned to the system file SYSDTA.

Format

SYSDTA( )


Result type

STRING

Input parameters

None

Result

The format of the output corresponds to the output of the /SHOW-SYSTEM-FILE-ASSIGNMENT command (see the “Commands” manual [3]).

File
Name of the file that SYSDTA is assigned to.

*LIB-ELEM(library,element(version),type)
Library element (designated by the name of the library, the name of the element with its version and the element type) that SYSDTA is assigned to.

*VAR(variable)
List variable that SYSDTA is assigned to.

*PRIMARY
The primary assignment applies to SYSDTA (terminal in the dialog or the SPOOLIN file in batch mode).

*SYSCMD
When SYSDTA was explicitly assigned to the system file SYSCMD.

Error message

SDP0435  DESIRED INFORMATION NOT AVAILABLE

Examples

In the dialog:

/A = SYSDTA()
/SHOW-VARIABLE A
A = *PRIMARY 

In the procedure:

The procedure C.PROC contains the following commands:

/A = SYSDTA()
/SHOW-VARIABLE A

The following line is output when the procedure is run:

A = *SYSCMD

This is the default value for SYSDTA in S procedures.

Output for various assignments:

  • SYSDTA is assigned to a file

    /ASSIGN-SYSDTA TO=TEST.INPUT-DATA.1
    /A = SYSDTA()
    /SHOW-VARIABLE A
    A = :2OSG:$USER1.TEST.INPUT-DATA.1                                           
    
  • SYSDTA is assigned to a library element

    /ASSIGN-SYSDTA TO=*LIB-ELEM(LIB=ASS.PLAMLIB,ELEM=TEST.DTA.1,TYPE=S)
    /A = SYSDTA()
    /SHOW-VARIABLE A
    A = *LIB-ELEM(:2OSG:$USER1.ASS.PLAMLIB,TEST.DTA.1(*UPPER-LIMIT),S)          
    
  • SYSDTA is assigned to a list variable

    /ASSIGN-SYSDTA TO=*VARIABLE(DATA-1)
    /A = SYSDTA()
    /SHOW-VARIABLE A
    A = *VAR(DATA-1)