Assembler development using Unix System Services



High Level Assembler(HLASM) for MVS & VM & VSE

Assembler development using Unix System Services

Postby mwilliams » Fri Mar 29, 2013 7:18 am

Well, I am just curious, has anyone ever compile and linkedit assembler code while using the commands available in the Unix System Services shell (BPXBATCH & OMVS)?

I have been experimenting to some limited success using either of the following commands: c89, cc, & c++.

For example to compile an assembler module (assuming the *.s as the default extension for assembly language.
cc -o printargs.o -c  -W a,list printargs.s


The following link edits the object file: printargs.o
cc – sasm –W l,list –e SASM printargs.o


By default the linkage editor, creates the sasm executable as reentrant
However, while using the parameter –W l,norent is flagged by the linkage editor as ‘NORENT’ as not a valid option. Yet, ‘NORENT’ is valid parameter for the batch (IEWL) binder.

Does anyone has any ideas how to linkedit a non reentrant in USS?
mwilliams
 
Posts: 11
Joined: Thu Feb 07, 2013 8:55 am
Has thanked: 0 time
Been thanked: 1 time

Re: Assembler development using Unix System Services

Postby steve-myers » Sat Apr 06, 2013 6:33 am

I don't know anything about running the Assembler and Binder in the OMVS environment; I suspect they are attempting to use the Binder SETOPT statement rather than use the equivalent of the PARM parameter. http://publibz.boulder.ibm.com/cgi-bin/ ... 0610105152 appears to state that JCL options like NORENT are not allowed. You would have to use something like SETOPT PARM(REUS(NONE)). I have not tested this; I just spent some time with the manual.

HTH
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Assembler development using Unix System Services

Postby mwilliams » Wed Apr 10, 2013 9:56 am

Thanks, :)
the following option now results in a non reentrant executable:

cc -o sasm -W l,list -W l,REUS=NONE -e SASM printarg.s

As for the OMVS environment, this provides to some degree, the portability of commonly used UNIX tools for development. Although, the actual assembly code is unique per given platform, the use scripts, make tool, etc. can be used as alternatives to the z/OS JCL for program development.

However, though with my limited exposure to UNIX, the following (which were no present in older releases of USS), I believe, are the preferred way of assembling and link-editing programs:

as -o printargs.o --"LIST,OBJ,NODECK,RENT" -a=printargs.lst printargs.s

The above invokes the HLASM assembler, to creates object and compile listing, while supplying the assembler options in quotes.
(Incidentally, I’ve modified the code to be reentrant)

ld -o sasm -b REUS=RENT,PRINT=YES -e SASM printargs.o

The above invokes the Program Management Binder to create an executable.

For further details, see z/OS UNIX System Services Command Reference (z/OS V1R13.0)
http://www-03.ibm.com/systems/z/os/zos/bkserv/r13pdf/#BPX

These users thanked the author mwilliams for the post:
dick scherrer (Wed Apr 10, 2013 7:21 pm)
mwilliams
 
Posts: 11
Joined: Thu Feb 07, 2013 8:55 am
Has thanked: 0 time
Been thanked: 1 time

Re: Assembler development using Unix System Services

Postby dick scherrer » Wed Apr 10, 2013 7:21 pm

Thanks for posting this!

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post