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

How can I code this map ?


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Fri Nov 16, 2012 2:58 pm
Reply with quote

Hi all.
I would like to know that how can I code a map which has several fields like this.


LOCATION : __________
S NO. NAME DEPARTMENT
____ __________ ________________
____ __________ ________________
____ __________ ________________
____ __________ ________________
____ __________ ________________
____ __________ ________________
____ __________ ________________

Location :- char(10)
S.no :- char(03)
Name :- char(10)
Department :- char(15)

These are the output fields where the data is given in the location and values inside the table are fetched if they match with the location here.

Note :- I have coded the map until the "S.NO NAME DEPARTMENT" row.
But I could not understand how to code the next fields in the map as it is difficult to hard code for each line individually.
Others say that there is an array concept in CICS. But I was unable to get a clear answer from others as well.

Any help would be appreciated.
[/img]
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Nov 16, 2012 5:09 pm
Reply with quote

I am sorry your requirement is very unclear for me atleast

Do you mean you wanted a Scrollable screen in CICS?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Nov 16, 2012 5:39 pm
Reply with quote

Use SDF II
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 16, 2012 5:44 pm
Reply with quote

Are you using BMS? SDF II? Some other screen development tool you didn't bother to mention?

Have you clicked on the Manuals link at the top of this page, found the CICS Application Programming Reference manual (called Language Reference on the Manuals page), and read A.9.3 on DFHMDF -- particularly the parts about GRPNAME and OCCURS?

You DO realize, I hope, that if you had just coded the map fields, you would have a compiled map by now, rather than waiting for forum responses?
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Mon Nov 19, 2012 11:07 am
Reply with quote

I am using a BMS here.
I have tried occurs.
But its not working.
Its not working.

I have coded like this.

Code:
INFLD DFHMDF POS=(8,02),ATTRB=(PROT,NORM),LENGTH=01, 
               INITIAL='_',OCCURS=15                 
      DFHMDF POS=(8,05),ATTRB=(PROT,NORM),LENGTH=15, 
               INITIAL='_______________',OCCURS=15   
      DFHMDF POS=(8,22),ATTRB=(PROT,NORM),LENGTH=03, 
               INITIAL='___',OCCURS=15               
      DFHMDF POS=(8,26),ATTRB=(PROT,NORM),LENGTH=19, 
               INITIAL='___________________',OCCURS=15
 


This is the error message if OCCURS is used ->
Code:

 4,FIELDS OVERLAPPING WITH MODE = IN OR INOUT.


Note :- Totally three statements which are having OCCURS are flagged as error messages.

Code'd
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Nov 19, 2012 1:17 pm
Reply with quote

Although I find the song "catchy", I don't think it'll be a hit.

What did you make of the error messages? If you look at the definitions you've coded is there anything which may suggest why they overlap?

Hit the manuals and see what it is you've actually told the machine to do, and see if you can get to something different.
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Mon Nov 19, 2012 4:33 pm
Reply with quote

@Bill Woodger.

I have referred the manual Mr.Bill Woodger.
I found the same syntax there.
I could not understand why the fields are overlapping if the OCCURS is used here.
Correct me if I am wrong.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Nov 19, 2012 5:38 pm
Reply with quote

You ARE aware, I hope, that map definition goes left to right on each line, then top to bottom from line to line? Hence defining a field at (8,2) with a length of 1 and OCCURS=15 is not going to give you 15 lines of data starting in the 2nd column of each line, but 15 bytes defined on line 8.
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Mon Nov 19, 2012 5:45 pm
Reply with quote

Yes sir.
You are absolutely right about this.
The map is (24,80) size.
I have checked the number of rows coded in the map also.
The program doesn't violate coding beyond 24 rows too.
1,3,4,5,6,7,8, then the 15 lines(USING OCCURS) and 24th row(last line) are the rows I have coded in.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Nov 19, 2012 8:07 pm
Reply with quote

Really? How come 8,2 with a length of 15 (or a length of 1 15 times) doesn't "overlap" 8,5? Which you haven't seemed to pick up on even with Robert pointing it out to you...
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Wed Nov 21, 2012 12:58 pm
Reply with quote

@Bill Woodger, @Robert Sample.

I am sorry.
I understood what you say here.
I referred the manual also.
It was the same what I code here.

But I am unable to code it from overlapping.
Please tell me how to code it properly.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Nov 21, 2012 1:15 pm
Reply with quote

I just googled to see what type of stuff is out there:

CICS Transaction Server v2.3 wrote:
Repeated fields: the OCCURS option

Sometimes a screen contains a series of identical fields that you want to treat as an array in your program. Suppose, for example, that you need to create a display of 40 numbers, to be used when a clerk assigns an unused telephone number to a new customer. (The idea is to give the customer some choice.) You also want to highlight numbers which have been in service recently, to warn the customer of the possibility of calls to the previous owner.

You can define the part of your screen which shows the telephone numbers with a single field definition:

TELNO DFHMDF POS=(7,1),LENGTH=9,ATTRB=NORM,OCCURS=40

This statement generates 40 contiguous but separate display fields, starting at position (7,1) and proceeding across the rows for as many rows as required (five, in our case). We have chosen a length that (with the addition of the attributes byte) divides the screen width evenly, so that our numbers appear in vertical columns and are not split across row boundaries. The attributes you specify, and the initial value as well, apply to each field.


Now, if you can show what you have discovered which says different, then we can say why it is wrong.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 21, 2012 5:28 pm
Reply with quote

Quote:
I understood what you say here.
I referred the manual also.
It was the same what I code here.

But I am unable to code it from overlapping.
Please tell me how to code it properly.
The fields are overlapping because as you have them coded they go across the row from (8,2) to (8,3) to (8,4) to (8,5) -- hence the overlap -- and I believe your basic problem is that you do not understand the OCCURS will not flow DOWN the screen from line to line but rather ACROSS the screen, completely filling row 8 before starting on row 9.

Quite simply, I am not aware of any way to get an OCCURS in BMS to flow from line to line, which means you are going to have to code up the field definitions for each and every line. Your original post has 3 fields per line, so you'll need AT LEAST 45 field definitions in your BMS map to define all 15 lines (60 if you use a stop attribute).
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Wed Nov 21, 2012 6:49 pm
Reply with quote

@Robert Sample

I got your point.
And I coded each and every field in the map separately.
And my map is ready with 500 lines of code in it.
And the output looks similar to my requirement.
I don't know how to paste an image here. Else would have shown the MAP.


I thank you all for clearing my doubts.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Nov 21, 2012 10:30 pm
Reply with quote

I am not a CICS guy, but MFS (an IMS thing very similar to BMS) has a DO / ENDDO structure that lets you define repeated lines. Does BMS have something similar?

Here is a snippet:
Code:
         DO    14,1,MAX,SUF=01                               
ZSEL     DFLD POS=(06,002),LTH=1,ATTR=(ALPHA,NORM,MOD)       
FCHAR    DFLD POS=(06,004),LTH=1,ATTR=(NUM,PROT,HI,NOMOD)   
PTYPE    DFLD POS=(06,006),LTH=1,ATTR=(NUM,PROT,HI,NOMOD)   
CUSNO    DFLD POS=(06,008),LTH=13,ATTR=(NUM,PROT,HI,NOMOD)   
RECDT    DFLD POS=(06,022),LTH=9,ATTR=(NUM,PROT,HI,NOMOD)   
PAYDT    DFLD POS=(06,032),LTH=9,ATTR=(NUM,PROT,HI,NOMOD)   
PAYRT    DFLD POS=(06,043),LTH=10,ATTR=(NUM,PROT,HI,NOMOD)   
PAYCUR   DFLD POS=(06,054),LTH=4,ATTR=(NUM,PROT,HI,NOMOD)   
AMTPAY   DFLD POS=(06,060),LTH=14,ATTR=(NUM,PROT,HI,NOMOD)   
AMTCUR   DFLD POS=(06,075),LTH=4,ATTR=(NUM,PROT,HI,NOMOD)   
         ENDDO                                               
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Thu Nov 22, 2012 11:59 am
Reply with quote

@Don.Leahy

Its been very useful.
Thank you very much.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Nov 22, 2012 11:16 pm
Reply with quote

This is the first time I've ever given a useful answer to a CICS question. icon_smile.gif

And to all of our American friends on this board: Happy Thanksgiving! Enjoy your 4 day weekend.
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Fri Nov 23, 2012 11:25 am
Reply with quote

I thank you all for your valuable suggestions.
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top