DD Statements and Missing Modules



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

Re: DD Statements and Missing Modules

Postby steve-myers » Sun Sep 23, 2012 10:46 am

We're not here to write tutorials, but here goes.

Let's say you have a program like this.
WRITER   CSECT
         ...
         OPEN  (OUTDCB,OUTPUT)
         ...
         CLOSE OUTDCB
         ...
OUTDCB   DCB   DSORG=PS,MACRF=PM,DDNAME=OUTPUT
         END
Now, obviously this is not a complete program. It writes data to one dataset, specified by a DD statement with DD name OUTPUT.

Your installation defines a cataloged procedure to assemble, link edit, and execute an Assembler program called XCLG. It has these statements.
//XCLG    PROC
//C       EXEC PGM=ASMA90,PARM='OBJECT,NODECK'
//SYSPRINT DD  SYSOUT=*
          ...
//SYSLIN   DD  DISP=(MOD,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=296),
//             DSN=&&LOADSET
          ...
//L       EXEC PGM=IEWL,PARM='MAP,LIST'
//SYSPRINT DD  SYSOUT=*
//SYSLIN   DD  DISP=(OLD,PASS),DSN=&&LOADSET
//SYSLMOD  DD  DISP=(NEW,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1,1)),
//             DSN=&&GOSET(GO)
//G       EXEC PGM=*.L.SYSLMOD

This procedure has three steps. The first step, identified by step name C, assembles the source program. One of the datasets , identified by DD name SYSLIN, contains the binary program created by the Assembler from your source. This data is not executable as it exists. This dataset has temporary dataset name &&LOADSET

The second step, identified by step name L, prepares a binary executable load module from the object output from the Assembler. The load module is stored in a temporary dataset identifed by data set name &&GOSET and member name GO.

The third step, identified by step name G, executes the load module prepared by the L step. This step has no DD statements. Well, actually that's not quite true. The trick EXEC statement defines a DD statement that is the temporary dataset created by the SYSLMOD DD statement in the L step. It was done this way because the early OS/360 did not have STEPLIB DD statements, and this trick was used to get around this lack.

To run your program you would use JCL like this:
//USERJCL  JOB ...
//A       EXEC XCLG
//C.SYSIN  DD  -- Dataset containing source program --
//G.OUTPUT DD  -- Output dataset --
The first DD statement after the // EXEC statement is //C.SYSIN. The C. in the DD name tells the system this DD statement belongs the step C. The next DD statement specifies //G.OUTPUT. The G. in the DD name tells the system the DD statement belongs tpo step G, but the actual DD name is OUTPUT, not G.OUTPUT.

These users thanked the author steve-myers for the post:
RISCCISCInstSet (Sun Sep 23, 2012 10:54 am)
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Re: DD Statements and Missing Modules

 

Re: DD Statements and Missing Modules

Postby RISCCISCInstSet » Sun Sep 23, 2012 11:27 am

Okay, I got something that seems to work, with this sub-problem. I'll get back to this thread if I find it's not really solved and I can't straighten it out without a little help. Thanks! :)
RISCCISCInstSet
User avatar
RISCCISCInstSet
 
Posts: 121
Joined: Mon Oct 17, 2011 1:46 pm
Has thanked: 146 times
Been thanked: 0 time

Re: DD Statements and Missing Modules

Postby RISCCISCInstSet » Sun Sep 23, 2012 11:31 am

(another thing - I meant seriousness not hostility with the previous textual emoticon)
RISCCISCInstSet
User avatar
RISCCISCInstSet
 
Posts: 121
Joined: Mon Oct 17, 2011 1:46 pm
Has thanked: 146 times
Been thanked: 0 time

Previous

Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post