Friday, December 17, 2010

How do I setup the Assemble-Link Job(JCL)?

Before you start writing Programs, you need to set up an Assemble-Link job(JCL), that'll help assemble your program into a Load Module. Once you have a Load-Module ready, you can run it and see the magic.

Most installations have ready-to-use PROCS such as ASMHC to assemble a Program, ASMHCL to assemble-and-link a Program and ASMHCLG to Assemble-Link-Go(Run) the program. If these aren’t found at your shop, try looking for ASMAC, ASMACL and ASMACLG. Better even ask your System Programmer for a JCL. The Assembler-software on Mainframes is the Program ASMA90. This is how I have setup my Assemble-link Job. I am going to use the ready-made PROC ASMACL.  There are two important customizations or overrides you need to do. ASMACL expects you to supply two Files – //SYSIN, the Input Source Program, and //SYSLMOD, the output Load Module. I have stored my Source-Program in the Member ASPROGR01 under the Library SYSADM.DEMO.SRCLIB. I hooked up and attached SYSIN inlet to this file SYSADM.DEMO.SRCLIB(ASPROG01). The Assembler internally passes its output to the Linker. The Linker-Software HEWL, produces an Output Load Module and stores it in the SYSLMOD File. I would like the Executable Load Module ASPROG01 to be created under SYSADM.DEMO.LOADLIB. Hence, SYSLMOD output is hooked to the File SYSADM.DEMO.LOADLIB(ASPROG01).