How do you compile/bind using rexx or in USS?



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

How do you compile/bind using rexx or in USS?

Postby chong_zhou » Tue Nov 21, 2017 6:43 pm

Hi guys, I'm a beginner to MF and am self-studying HLASM, so I need to write a lot of test program for practise.

Sometimes I have to recompile/rebind the program very frequently, so doing it with JCL is quite inconvenient, because I have to switch to SDSF and 'press-press-...-press' enter key in order to watch the progress and read logs.

Is there a way to compile/bind it in foreground instead of submitting job? Some thing like the C89/C99 frontend tools?

I know the 'as' command, but I only found a very brief introduction for it in IBM's knowledge center. And after compiling the asm source code, I do not know what command I can use to bind the object files.

Thank you guys for your help in advance!
chong_zhou
 
Posts: 40
Joined: Wed Nov 01, 2017 8:59 pm
Has thanked: 21 times
Been thanked: 0 time

Re: How do you compile/bind using rexx or in USS?

Postby enrico-sorichetti » Tue Nov 21, 2017 7:21 pm

a proper JOB card with the NOTIFY clause will let You know when the job has finished :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
chong_zhou (Tue Nov 21, 2017 7:27 pm)
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: How do you compile/bind using rexx or in USS?

Postby steve-myers » Tue Nov 21, 2017 7:58 pm

For many years I've used a CLIST in straight TSO to allocate the data sets and run HLASM. I do not use USS at all. After the compile I use the regular LINK command to link the module.

For each project I usually custom write a CLIST, which usually looks like this -
proc 0
control list
sasm xxx options
if &lastcc <= 4 then +
 do
  listdsi xxx.load
  if &lastcc = 0 then cleard xxx.load
  alloc f(syslib) shr reus da(load)
  link xxx load(xxx(xxx))
  link xxx test
  freesys
  free f(syslib)
 end


The first link command builds an executable module without the TEST command symbols. The second link builds the module with TEST command symbols.

The CLEARD command is a private command to delete all members and "compress" the data set; it's faster than deleting and reallocating the data set.

FREESYS frees all SYSnnn (where nnn is numerics) DD statements; LINK leaves a bunch of them behind.

The SASM CLIST also depends on a private command. This command is comparable to CALL *(module) but it has the capability of calling the module with a DD list to use alternate DDnames; the command has a number of pre-designated DD names - like ASMDD for the Assembler.

The LOAD library allocated before the LINK commands contains library routines that many of my programs use. I could use LIB('myuserid.LOAD') in the link commands, but this seems to work a little better for me

These users thanked the author steve-myers for the post:
chong_zhou (Tue Nov 21, 2017 9:22 pm)
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: How do you compile/bind using rexx or in USS?

Postby willy jensen » Wed Nov 22, 2017 10:45 pm

I have 3 ISPF edit macros: ASM, LINK and ASML for doing assembly, linkedit or both of the edited data.
The edited data is copied to a temporary dataset, so no need to save in between changes.
Options and directives are in the assembly source as comments.
The list can be shown in the same ISPF screen, or in a new screen.

The macros are fairly big, so I would rather not upload them here. Instead they can be found as 'ASML' here: http://harders-jensen.com/wjtech/programs.html
Documentation is in the macros.

These users thanked the author willy jensen for the post:
chong_zhou (Fri Dec 01, 2017 5:05 pm)
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: How do you compile/bind using rexx or in USS?

Postby enrico-sorichetti » Thu Nov 23, 2017 12:27 pm

while compiling and running things in the foreground ( terminal TSO session ) is technically feasible
everybody should remember that company/organisation practices and standards might frown about it
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: How do you compile/bind using rexx or in USS?

Postby prino » Fri Nov 24, 2017 1:46 am

steve-myers wrote:The CLEARD command is a private command to delete all members and "compress" the data set; it's faster than deleting and reallocating the data set.

Does it handle PDSE's?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: How do you compile/bind using rexx or in USS?

Postby steve-myers » Fri Nov 24, 2017 5:52 am

PDSEs? No. CLEARD could be altered for the purpose fairly easily, but since I have no need for it, and it's never been published, it's not worth my time. An unpleasant side effect is the data set would have to be allocated DISP=OLD.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: How do you compile/bind using rexx or in USS?

Postby willy jensen » Fri Nov 24, 2017 4:44 pm

PDS86 program from cbttape.org file 182 can clear a PDSE (command: FIX RESET).
And do almost anything you can think of doing for / to a PDS/E.
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: How do you compile/bind using rexx or in USS?

Postby chong_zhou » Fri Dec 01, 2017 5:10 pm

willy jensen wrote:I have 3 ISPF edit macros: ASM, LINK and ASML for doing assembly, linkedit or both of the edited data.
The edited data is copied to a temporary dataset, so no need to save in between changes.
Options and directives are in the assembly source as comments.
The list can be shown in the same ISPF screen, or in a new screen.

The macros are fairly big, so I would rather not upload them here. Instead they can be found as 'ASML' here: http://harders-jensen.com/wjtech/programs.html
Documentation is in the macros.


Thank you very much Willy. I will try your 'macro' to see if it works for me. (I saw they are actually REXX script)
chong_zhou
 
Posts: 40
Joined: Wed Nov 01, 2017 8:59 pm
Has thanked: 21 times
Been thanked: 0 time

Re: How do you compile/bind using rexx or in USS?

Postby steve-myers » Fri Dec 29, 2017 12:08 pm

Well, it only took 27 years (and at least 3 failed starts, 1 for AsmH and 2 for High Level Asm) but I now have a usable TSO command processor to run the High Level Assembler in the TSO environment without the benefit of a CLIST or Rexx EXEC. This is far superior to the HLASM command in CBT file 300. Details of the planned feature set are still in development and I'm undecided if I will publish it. PM me if you're interested.

These users thanked the author steve-myers for the post:
chong_zhou (Tue Jan 02, 2018 9:56 am)
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Next

Return to Assembler