You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在z/OS USS中使用C++(CXX)编译链接时SYSLIB定义问题求助

Fixing ABEND S013-38 When Linking C Programs with CXX in z/OS USS

Let's break down how to resolve this IEW linker error—ABEND S013-38 means the linker can't access the SYSLIB partitioned data sets (PDS/PDSE) you've specified, even after setting _CXX_LSYSLIB. Here are actionable steps to diagnose and fix the issue:

  • Verify the existence and type of your specified data sets
    First, confirm each library in your _CXX_LSYSLIB actually exists and is a valid PDS/PDSE. Use the listds command for each entry:

    listds CEE.SCEELKEDX
    listds CEE.SCEELKED
    listds CBC.SCCNOBJ
    listds SYS1.CSSLIB
    

    Check the output for "Data Set Type"—it should show "PARTITIONED" or "PARTITIONED DATA SET EXTENDED". If any dataset is missing, correct the name or confirm with your system admin if it's required for your build.

  • Check your read permissions on the datasets
    Even if the datasets exist, your user ID might lack read access. Use ls -E to inspect permissions:

    ls -E CEE.SCEELKEDX
    

    Look for the r (read) flag in the permission string for your user or group. If you don't have read access, reach out to your system administrator to grant the necessary permissions.

  • Validate your _CXX_LSYSLIB environment variable format
    Double-check the variable for typos, incorrect case, or invalid separators:

    • z/OS dataset names are case-sensitive (they should be all uppercase) — ensure you haven't used lowercase letters.
    • The path separator is indeed :, but make sure there are no extra spaces before or after the colons.
    • Print the variable to confirm its value matches your intended setup:
      echo $_CXX_LSYSLIB
      
  • Test linking manually to bypass environment variables
    To rule out issues with the _CXX_LSYSLIB variable not being picked up, try invoking the linker directly with the SYSLIB datasets specified explicitly:

    # First compile your source to object code
    cxx -c your_program.c
    # Then link manually with IEWL
    iewl your_program.o 'SYSLIB(CEE.SCEELKEDX,CEE.SCEELKED,CBC.SCCNOBJ,SYS1.CSSLIB)' -o your_program
    

    If this succeeds, the problem is likely with how the environment variable is being applied (e.g., it's being overridden by another variable, or not exported correctly in your shell session).

  • Check for conflicting environment variables
    Other CXX-related variables might be overriding _CXX_LSYSLIB. List all CXX-related environment variables to spot conflicts:

    env | grep CXX
    

    Look for variables like _CXX_LFLAGS that might include their own SYSLIB specifications, which could take precedence.

  • Ensure library and compilation target bitness match
    Libraries like CEE.SCEELKEDX are 64-bit, while CEE.SCEELKED is 32-bit. Confirm your compilation flags align with the library bitness:

    • For 64-bit builds, use -Wc,LP64
    • For 32-bit builds, use -Wc,ILP32
      Mismatched bitness can lead to unexpected access errors, so make sure your compile options match the libraries you're linking against.

内容的提问来源于stack exchange,提问作者Papa Dilbert

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 08:38:56