Need some guidance whilw workinf with map



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

Need some guidance whilw workinf with map

Postby kandrepavan » Thu Jul 12, 2012 2:17 pm

Hi all,

I am working with cics pgm.MY REQ is to validate every field Ie if no data is entered in any field then i am trying to throw a msg.
cics screen:


USER NAME:
--------------------
PASSWORD :
--------------------
RPASSWORD:
--------------------

MSG: ----------------------------------------
F1=HOME F3=EXIT F2=SUB

after pressing F2 key


USER NAME:
--------------------
PASSWORD :
--------------------
RPASSWORD:
--------------------

MSG: USERNAME ALREADY EXSIT

see the msg , though i dont enter any thing it creating a username with spaces( i dont know whether it creating with spaces or
any other character, but when i seee my table empty row woth spaces is created) . i coded in the app prog if sunamel=0
'enter ur name'
but i am not getting like so...........

Thanx and regards.
pavan
kandrepavan
 
Posts: 35
Joined: Wed Mar 21, 2012 11:03 am
Has thanked: 0 time
Been thanked: 1 time

Re: Need some guidance whilw workinf with map

 

Re: Need some guidance whilw workinf with map

Postby Monitor » Thu Jul 12, 2012 3:14 pm

The right way to check, as you said, is to check the L-suffix of the fileds involved for zero.
Pls note that spaces count as data so if you dont accept spaces, you have to check for that.
Not very complicated.
If you still don't succeed, post the code and you will get some assistance.
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: Need some guidance whilw workinf with map

Postby NicC » Thu Jul 12, 2012 5:34 pm

And do not throw messages - you might hurt someone. On the mainframe you issue messages and/or display them.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2533
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm
Has thanked: 4 times
Been thanked: 88 times

Re: Need some guidance whilw workinf with map

Postby kandrepavan » Sat Jul 14, 2012 3:00 pm

Hi all,

My observations:
1) In map , i used FRSET nad FSET ( it avoids AEI9 ) and received the map AEI9 is avoided, but i didnt entered any data
in the field ok , in app pgm i checked F+L = 0 or spaces the condition is failed....so i was unable to validate the field for
zero(no) characters....so to overcome that i tried the following
2) In map , i didnt used FRSET and FSET so while receiving map i was getting AEI9... SO I used IGNORE CONDTION MAPFAIL
in app pgm and i checked F+L = 0 OR SPACES the condition is satisfied and i am able to validate the field for
Zero (no) characters ..so atlast i got like ds , but i dont know whether ds approach is correct or not
PLease post the correct approach.

Next task:
let the map be f1: ----- f2:-----------
msg:------------------
pressed enter/fun key getting the msg , 'pls enter F1 Data'
i entered data in F1 then pressed enter / funkey then ds time shows the msg 'pls enter F2 Data' (F1 DATA IS VISIBLE)
then i entered data in F2 and ENTER/FUN KEY then ds time it shows 'pls enter data in f1'
so how to overcome ds problem?
kandrepavan
 
Posts: 35
Joined: Wed Mar 21, 2012 11:03 am
Has thanked: 0 time
Been thanked: 1 time

Re: Need some guidance whilw workinf with map

Postby Monitor » Sat Jul 14, 2012 5:52 pm

Why not post the code, as I told you, and I will tell you how to code!
By the way, there are no problems here just, just lack of CICS knowledge!
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: Need some guidance whilw workinf with map

Postby Monitor » Sat Jul 14, 2012 6:27 pm

Monitor wrote:Why not post the code, as I told you, and I will tell you how to code!
By the way, there are no problems here just, just lack of CICS knowledge!

You should not code Handle Condition or Ignore Condition.
Code RESP(respvariable), check manual for details, in your Receive MAP-command. Just igner whats in the respvariable and do som checking for valid data.
You dont have to take care of the Mapfail condition if you use this approach.
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: Need some guidance whilw workinf with map

Postby Robert Sample » Sat Jul 14, 2012 6:46 pm

I echo others comments in stating you need to be using RESP on every CICS command you issue -- period. HANDLE CONDITION and IGNORE CONDITION are older, likely to be phased out by IBM eventually, and not nearly as flexible and useful as the RESP option.

Further, you need to spend a lot of time reading the CICS Application Progrmaming Reference and Application Programming Guide manuals so you understand what a MAPFAIL really means and why you get them and why you don't want to ignore them.

Also, you don't check numeric variables for SPACES -- a numeric variable cannot typically contain spaces, just numbers. Especially system-generated variables that are part of the map.
Robert Sample
Global moderator
 
Posts: 3130
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 185 times


Return to CICS