Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

%include DD1 and %include MM1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: %include DD1 and %include MM1
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    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Feb 24, 2009 3:36 pm    Post subject:
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    Post subject: Reply to: %include DD1 and %include MM1
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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Feb 24, 2009 7:39 pm    Post subject:
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    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

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

That's correct.

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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Feb 25, 2009 1:35 pm    Post subject:
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    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Feb 25, 2009 2:54 pm    Post subject:
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    Post subject:
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    Post subject:
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
http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entpli.doc_3.7/ibma1mst215.htm
http://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    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Feb 26, 2009 1:52 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts Include Cond issue vickey_dw DFSORT/ICETOOL 6 Tue Mar 29, 2016 8:51 pm
No new posts Case insenstive in INCLUDE Condtion smileseenu DFSORT/ICETOOL 2 Mon Feb 15, 2016 8:42 pm
No new posts Include groups of records jyotsnapanicker SYNCSORT 4 Wed Dec 30, 2015 4:37 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us