MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BMS Map Compilation To Include Cobol Copybook

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
bay hoe san
Beginner


Joined: 12 Dec 2006
Posts: 16
Topics: 9

PostPosted: Fri May 04, 2007 3:44 am    Post subject: BMS Map Compilation To Include Cobol Copybook Reply with quote

Hello,

( 1) May I check with experts like u on whether we can include a Cobol copybook in a BMS source and subsequently have it compiled into a Cobol copybook and a map load module?
( 2) If it is possible to include a Cobol copybook in the BMS source, what's the syntax? Is it Copy "copybook name"?
( 3) Pls advise.
Thank you and have a nice day ahead.

.Hoe San.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri May 04, 2007 4:44 am    Post subject: Reply with quote

a COBOL copybook contains either data definitions or procedure statements in COBOL syntax used to build a COBOL source program; they are introduced into the source stream via the COBOL Compiler directive: COPY

FROM the CICS Appl Pgm Guide:
Quote:
Basic mapping support (BMS) is an application programming interface between CICS programs and terminal devices.


BMS syntax is different than COBOL, so attempting to assemble a map that included COBOL syntax and BMS syntax would probably not fly.

here is a good place to start reading about BMS
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
bay hoe san
Beginner


Joined: 12 Dec 2006
Posts: 16
Topics: 9

PostPosted: Mon May 07, 2007 6:56 pm    Post subject: Reply with quote

Hello,

( 1) Thanks for your advance.
( 2) However, 1 of my teammates has the thought of using the statement "COPY XXXXXX" where XXXXXX is another BMS map. His reason for using is that the bottom (line 20 to 24) of about 10 screens are the same. This map is included in the SYSLIB during generation of the map copybook and load module.
( 3) Is it acceptable?
Thank you.

.Hoe San.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue May 08, 2007 2:33 am    Post subject: Reply with quote

If you cannot find a something like what you want in the manual then the answer is 'NO'
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Tue May 08, 2007 3:40 am    Post subject: Re: BMS Map Compilation To Include Cobol Copybook Reply with quote

bay hoe san wrote:
May I check with experts like u on whether we can include a Cobol copybook in a BMS source and subsequently have it compiled into a Cobol copybook and a map load module?
Sounds to me like you are having problems finding any "experts"....
The BMS source is used to create the BMS CSECT needed by CICS to generate and parse the screen image and the COBOL or Assembler DSECT needed by your program to access the fields of that screen image.
Quote:
If it is possible to include a Cobol copybook in the BMS source, what's the syntax? Is it Copy "copybook name"?
Just specify the LANG when you assemble the TYPE=DSECT and you will get the output needed for your copybook.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue May 08, 2007 3:51 am    Post subject: Reply with quote

CICS Guy: my understanding is not the generation of the copybook but he wants to include common BMS source into his BMS sources by some means similar to the COPY and INCLUDE statements for copying commone source into Cobol and PL/1 programs.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue May 08, 2007 4:02 am    Post subject: Reply with quote

though inefficient in terms of processing, i've been in shops where the header and trailer (top 1 to 3 lines and bottom 4, 3?) maps were 1 standard map and the body (program) -lines 3 or 4 to 19 or 20,21... - was a third. After the initial send map of the header and trailer, only the header need be sent if there was a change in the data - time, page , etc... the trailer was only sent once............
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Tue May 08, 2007 9:02 am    Post subject: Reply with quote

We use assembler macros to define the common code at the top and bottom of our maps. Since the BMS source code is all assembler macros anyways this just saves a lot of time and trouble coding the maps and keeps all the maps the same where they need to be.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue May 08, 2007 9:11 am    Post subject: Reply with quote

That, I think, is what the guy wants. Now he will need the A, B, C of how to do it.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Tue May 08, 2007 11:36 am    Post subject: Reply with quote

Nic Clouston wrote:
That, I think, is what the guy wants. Now he will need the A, B, C of how to do it.


This is a macro that will produce the first 2 lines of the map. Line 1 has a screen id in the left side a heading center on the line and two fields on the right side for the current date & time. The second line has a field for the program version on the left, a field for LOC (locality), OFF (office), office name.

Code:
         MACRO                                                         
&MAP     SCREEN1 &HEADING=,&TRANSID=                                   
         AIF   (K'&TRANSID LT 1).ERROR3                                 
&QUOTE   SETC  ''''                                                     
&XTRAN   SETC '&TRANSID'                                               
         AIF ('&TRANSID'(1,1) EQ '''').TRANID2                         
&XTRAN   SETC '&QUOTE&TRANSID'                                         
.TRANID2 ANOP                                                           
&XL      SETA K'&TRANSID                                               
         AIF  ('&TRANSID'(&XL,1) EQ '''').TRANID3                       
&XTRAN   SETC '&XTRAN&QUOTE'                                           
.TRANID3 ANOP                                                           
&MAP     DFHMDI SIZE=(24,80)                                           
        DFHMDF POS=(1,1),                                              +
               LENGTH=6,                                               +
               INITIAL=&XTRAN,                                         +
               ATTRB=ASKIP                                             
&LS      SETA K'&HEADING                                               
&SS      SETA (((55-&LS)/2)+8)                                         
         AIF (&LS LT 1).ERROR2                                         
         AIF (&LS GT 54).ERROR2                                         
         DFHMDF INITIAL=&HEADING,                                      +
               POS=(1,&SS),                                            +
               LENGTH=&LS,                                             +
               ATTRB=(ASKIP,BRT)                                       
CURRENTDATE DFHMDF POS=(1,64),                                         +
               LENGTH=10,                                              +
               ATTRB=ASKIP                                             
CURRENTTIME DFHMDF POS=(1,75),                                         +
               LENGTH=5,                                               +
               ATTRB=ASKIP                                             
VERSION DFHMDF POS=(2,01),                                             +
               LENGTH=10,                                              +
               ATTRB=ASKIP                                             
         DFHMDF INITIAL='LOC:',                                        +
               POS=(2,12),                                             +
               LENGTH=04,                                              +
               ATTRB=(ASKIP,BRT)                                       
LOC          DFHMDF POS=(2,17),                                        +
               LENGTH=3,                                               +
               ATTRB=(ASKIP,BRT)                                       
         DFHMDF INITIAL='OFF:',                                        +
               POS=(2,21),                                             +
               LENGTH=04,                                              +
               ATTRB=(ASKIP,BRT)                                       
OFF          DFHMDF POS=(2,26),                                        +
               LENGTH=3,                                               +
               ATTRB=(ASKIP,BRT)                                       
LOCOFFNAME DFHMDF POS=(2,30),                                          +
               LENGTH=50,                                              +
               ATTRB=(ASKIP,BRT)                                       
         MEXIT                                                         
.ERROR2  MNOTE 8,'HEADING MUST BE 1 TO 54 CHARACTERS LONG'             
         MEXIT                                                         
.ERROR3  MNOTE 8,'TRANSACTION ID MUST BE 1 TO 6 CHARACTERS LONG'     
         MEND                                                       


This is how it is coded in the BMS source.

Code:
SCBCBI   DFHMSD TYPE=&SYSPARM,                                         +
               CTRL=(FREEKB),                                          +
               TIOAPFX=YES,                                            +
               MODE=INOUT,                                             +
               LANG=COBOL,                                             +
               STORAGE=AUTO                                             
SCBCBIA   SCREEN1 HEADING='WORKLOAD ENTRY',TRANSID='MCBIA'             
Back to top
View user's profile Send private message
bay hoe san
Beginner


Joined: 12 Dec 2006
Posts: 16
Topics: 9

PostPosted: Wed May 09, 2007 12:55 am    Post subject: Reply with quote

Hello,

( 1) Thank you very much for your advice.
( 2) Can I conclude that the word "COPY" is invalid in BMS source?
( 3) The way to include other BMS source is to use MACRO like the 2 examples above.
( 4) However, may I check with CraigG, the BMS source as in the 2nd example, after adding in the macro for the 1st 2 rows of the screen, the rest of the screen definition (row 3 to 24) we can put our codes under this BMS source, right?
( 5) Thank you very much to all of u all.

.Hoe San.
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Wed May 09, 2007 7:25 am    Post subject: Reply with quote

bay hoe san wrote:
Hello,

( 1) Thank you very much for your advice.
( 2) Can I conclude that the word "COPY" is invalid in BMS source?
( 3) The way to include other BMS source is to use MACRO like the 2 examples above.
( 4) However, may I check with CraigG, the BMS source as in the 2nd example, after adding in the macro for the 1st 2 rows of the screen, the rest of the screen definition (row 3 to 24) we can put our codes under this BMS source, right?
( 5) Thank you very much to all of u all.

.Hoe San.

( 2) Copy is not valid in BMS source, BMS source is assembler not cobol.
( 4) Yes you would code the remainder of your screen definition after the screen1 macro invocation. The screen1 macro would be in a PDS that would be included in SYSLIB in your BMS assemble jcl.
Back to top
View user's profile Send private message
bay hoe san
Beginner


Joined: 12 Dec 2006
Posts: 16
Topics: 9

PostPosted: Wed May 09, 2007 11:38 am    Post subject: Reply with quote

Hello,

( 1) Got it.
( 2) Thank you very the much.

.Hoe San.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group