IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

%include DD1 and %include MM1


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Tue Feb 24, 2009 6:35 am
Reply with quote

I am a new CICS coder, and When I read existing code in our company,
I found several way to include copybook, and could some guys let me know how to use them?
the following usage is standard or just in our company, could someone let me know?
and is there any other way to include copybook?

1. %include xxx //xxx could be copybook that conatins constants
2. %include dd1(xxx) // xxx could be copybook that contains structure
3. %include mm1(xxx) //xxx is the map name
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Tue Feb 24, 2009 1:52 pm
Reply with quote

oh, sorry, I forgot to state that we use PL/1
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue Feb 24, 2009 3:36 pm
Reply with quote

There are several was to include copybooks.

Standard for Cobol is COPY

Standard for PL/1 is %INCLUDE

Panvalet uses ++INCLUDE

others may exist. Check your source management documentation.

Garry.
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Tue Feb 24, 2009 6:42 pm
Reply with quote

I just don't know when should I use mm1,dd1 or just include some copybook directly?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue Feb 24, 2009 7:39 pm
Reply with quote

That depends on what's in mm1 and dd1. From the fact that you mention mapname and that this was originally in CICS forum, I suspect that this is a BMS MAP question.

The output from the TYPE=DSECT assembly of map source is a copybook which reflects the structure of the map. This is what you want to %INCLUDE in your source.

What generates the mm1? Is this the SYSLMOD from assembly of the TYPE=MAP? If so, this is a load module and does not go into your program but is a separate program (map) entry in CICS tables.

Garry.
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Wed Feb 25, 2009 7:30 am
Reply with quote

Please correct me if misunderstanding
1. %include xxx //xxx could be system copybook, like DFHAID, it could be included directly
eg:
%include DFHAID;
2. %include dd1(xxx) // xxx could be copybook that contains structure
eg:
DCL 1 xxx STATIC,
%INCLUDE DD1(yyy); //yy is a structure
3. %include mm1(xxx) //xxx is the map name where type=dsect, it is used to include generated symbolic map
eg:
%include MM1(xxxx)
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Wed Feb 25, 2009 1:34 pm
Reply with quote

That's correct.

Garry.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Wed Feb 25, 2009 1:35 pm
Reply with quote

Oopss, sorry. Just spotted the "STATIC" in your map declaration.

Do NOT use STATIC in CICS. This goes against re-entrancy.

Garry.
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Wed Feb 25, 2009 2:51 pm
Reply with quote

thx, is there any other usage like dd2 or something like that?till now, I just found three way to include like I mentioned above
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Wed Feb 25, 2009 2:54 pm
Reply with quote

The COPY INCLUDE specifies just the member-name. The PDS name(s) is/are given in the step's SYSLIB concatenation.

Garry.
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Thu Feb 26, 2009 6:47 am
Reply with quote

thx for your explain
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Thu Feb 26, 2009 7:18 am
Reply with quote

Maybe I know how to use the %include
first, you need have one dd statement with any ddname you like
yy1 DD DISP=SHR,DSN=aaa.bbb//aaa.bbb is the dataset which contains copybook

then you can wriet the code in PL/1 like this
%include yy1(xxx);//xxx is the member in dataset 'aaa.bbb'

if the member you will use is in syslib that contains IBM supplied copybook, you can write like this,
%include xxx;
or %include syslib(xxx)
please correct me if any misunderstanding
publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entpli.doc_3.7/ibma1mst215.htm
publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entpli.doc_3.7/ibma1mst156.htm
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Thu Feb 26, 2009 7:42 am
Reply with quote

If using changeman to compile code, you don't need write JCL where define ddname for copybook dataset.
so we can use the ddname provided by IBM changeman,like dd1,mm1
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Thu Feb 26, 2009 1:52 pm
Reply with quote

First you need a dd statement with trhe ddname of the PDS which containns the copybook members - e.g. ABC.COPYBOOK.PL1 which contains, say, members COPY0001 and COPy0002. This libray is in your SYSLIB concatenation as
Code:
//SYSLIB DD DISP=SHR,DSN=ABC.COPYBOOK.PL1

in your program, you would include these by coding
Code:
      %INCLUDE COPY0001 ;
      %INCLUDE COPY0002 ;


Garry
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Fri Feb 27, 2009 7:36 am
Reply with quote

thanks very much, Garry
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts ISRDSLST(3.4) Do not include addition... TSO/ISPF 0
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts INCLUDE COND with WHEN=GROUP SYNCSORT 12
This topic is locked: you cannot edit posts or make replies. include and copy COBOL Programming 4
Search our Forums:

Back to Top