Topic
  • No replies
SystemAdmin
SystemAdmin
196 Posts

Pinned topic Z/OS XL/C METAL How to code IEWL directives

‏2010-05-17T15:04:07Z |

Hello,

I need help to build an authorized module with Z/OS XL/C METAL.

I have tried this code (in file scope) : __asm ("PUNCH ' SETCODE AC(1)'":"DS"(AC));

The generated assembler code seems to be fine :
$STATIC DS 0D
DC (528)X'00'
ORG $STATIC
DC XL2'FFFF'
ORG ,
ORG $STATIC+16
PUNCH ' SETCODE AC(1)'
EJECT
The binder does not accept it (due to GOFF option)

IEW2690E 3530 ONE OR MORE FIELD DESCRIPTORS IN GOFF RECORD 59 WITHIN MEMBER NULL IDENTIFIED BY DDNAME SYSIN2 ARE NOT
VALID. ERRORID = 17.
IEW2307E 1032 CURRENT INPUT MODULE NOT INCLUDED BECAUSE OF INVALID DATA.
Thanks for ideas
Updated on 2010-05-27T20:39:47Z at 2010-05-27T20:39:47Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    196 Posts

    Re: Z/OS XL/C METAL How to code IEWL directives

    ‏2010-05-20T15:01:34Z  
    Below is a simple test that I used to try out your problem, I don't see the problem as you reported.

    __asm ("PUNCH ' SETCODE AC(1)'":"DS"(AC));
    int main()
    {
    return 0;
    }
    Could you please provide a simple test that I can take a closer look. Thanks.
  • SystemAdmin
    SystemAdmin
    196 Posts

    Re: Z/OS XL/C METAL How to code IEWL directives

    ‏2010-05-26T08:41:57Z  
    Below is a simple test that I used to try out your problem, I don't see the problem as you reported.

    __asm ("PUNCH ' SETCODE AC(1)'":"DS"(AC));
    int main()
    {
    return 0;
    }
    Could you please provide a simple test that I can take a closer look. Thanks.
    Sorry,

    there was a missing SPACE before the word PUNCH. The source here under produces the case (I used trigraphs due to my locale codepage)
    __asm (" PUNCH ' SETCODE AC(1)'":"DS"(AC));
    int main()
    ??< <br />
    return 0;
    ??>
    Binder Report
    z/OS V1 R11 BINDER 11:03:37 WEDNESDAY MAY 26, 2010
    BATCH EMULATOR JOB(PSxxxxxx) STEP(LKED ) PGM= IEWL
    IEW2278I B352 INVOCATION PARAMETERS - XREF,LET,LIST,CALL
    IEW2690E 3530 ONE OR MORE FIELD DESCRIPTORS IN GOFF RECORD 17 WITHIN MEMBER WPCLCCN7 IDENTIFIED BY DDNAME SYSLIN ARE
    NOT VALID. ERRORID = 17.
    IEW2307E 1032 CURRENT INPUT MODULE NOT INCLUDED BECAUSE OF INVALID DATA.
    IEW2230S 0414 MODULE HAS NO TEXT.
    IEW2677S 5130 A VALID ENTRY POINT COULD NOT BE DETERMINED.
    IEW2008I 0F03 PROCESSING COMPLETED. RETURN CODE = 12.
    Updated on 2010-05-26T08:41:57Z at 2010-05-26T08:41:57Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    196 Posts

    Re: Z/OS XL/C METAL How to code IEWL directives

    ‏2010-05-27T20:39:47Z  
    Sorry,

    there was a missing SPACE before the word PUNCH. The source here under produces the case (I used trigraphs due to my locale codepage)
    __asm (" PUNCH ' SETCODE AC(1)'":"DS"(AC));
    int main()
    ??< <br />
    return 0;
    ??>
    Binder Report
    z/OS V1 R11 BINDER 11:03:37 WEDNESDAY MAY 26, 2010
    BATCH EMULATOR JOB(PSxxxxxx) STEP(LKED ) PGM= IEWL
    IEW2278I B352 INVOCATION PARAMETERS - XREF,LET,LIST,CALL
    IEW2690E 3530 ONE OR MORE FIELD DESCRIPTORS IN GOFF RECORD 17 WITHIN MEMBER WPCLCCN7 IDENTIFIED BY DDNAME SYSLIN ARE
    NOT VALID. ERRORID = 17.
    IEW2307E 1032 CURRENT INPUT MODULE NOT INCLUDED BECAUSE OF INVALID DATA.
    IEW2230S 0414 MODULE HAS NO TEXT.
    IEW2677S 5130 A VALID ENTRY POINT COULD NOT BE DETERMINED.
    IEW2008I 0F03 PROCESSING COMPLETED. RETURN CODE = 12.
    When I examined the object file, the record that contains 'SETCODE AC(1)' does not start with X'03'. (GOFF object record starts with X'03'), that is why the binder complained.
    According to the HLASM language reference, the PUNCH instruction should not be used with the GOFF option, as the resulting file may be unusable.

    I also tried to assemble the .s file without the GOFF option. the binder ended with a warning. The warning indicates that the record contains SETCODE AC(1) has an invalid object identifier in column 1 (object module records are required to have X'02' in column 1). The record in error will be skipped, so the SETCODE statement is skipped.

    From the z/OS C Metal point of view, anything that the user puts in __asm is the user's own responsibility for making it acceptable to the assembler. In this case, you use the PUNCH instruction to add a record into the object file, so the "PUNCH" part works accordingly, but the SETCODE statement needs to be formatted into a correct object record format, this may not be doable in this case by using __asm.