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
 

 

How can I code this map ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: How can I code this map ?
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

Moderator


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

PostPosted: Fri Nov 16, 2012 5:09 pm    Post subject:
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri Nov 16, 2012 5:39 pm    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Fri Nov 16, 2012 5:44 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Nov 19, 2012 1:17 pm    Post subject: Reply to: How can I code this map ?
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    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Mon Nov 19, 2012 5:38 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Nov 19, 2012 8:07 pm    Post subject: Reply to: How can I code this map ?
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Wed Nov 21, 2012 1:15 pm    Post subject: Reply to: How can I code this map ?
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: 7913
Location: Bellevue, IA

PostPosted: Wed Nov 21, 2012 5:28 pm    Post subject:
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    Post subject: Reply to: How can I code this map ?
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Nov 21, 2012 10:30 pm    Post subject:
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    Post subject:
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: 641
Location: Whitby, ON, Canada

PostPosted: Thu Nov 22, 2012 11:16 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Help in understanding what is th... mainakdalal PL/I & Assembler 9 Mon Oct 03, 2016 8:03 pm


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