Page 1 of 1

How to remove underscores in the map???

PostPosted: Wed Jul 18, 2012 4:23 pm
by rajufis_01
hi,
i have one map with the employee id of picture clause length 4 bytes have entered only 2 bytes data rest 2 bytes of data i need spaces...to achive this can anyone help me out???
apologies if i am wrong

here is the example

Employee id : ____
After entering the data

Employee id : 12__
MY output should be

Employee id : 12

Re: How to remove underscores in the map???

PostPosted: Wed Jul 18, 2012 9:06 pm
by Monitor
Unless you havent specified an initial value for the field, there are no underscores in the map.
Check up your 3270-emulator for settings, that might give you the visual effect of underscore.

Re: How to remove underscores in the map???

PostPosted: Thu Jul 19, 2012 9:22 pm
by Ed Goodman
Some code generators will fill fields with underscores before showing the map. Look for an oddly named program being called just before the sending of the screen. If you find that, there is probably a program to do the opposite.

We had to deal with these in TELON when we needed to allow for underscores in some fields.

Re: How to remove underscores in the map???

PostPosted: Tue Aug 28, 2012 4:28 pm
by rajufis_01
Thanks for your reply Goodman, can you please send me a pseudo code i am not clear with your answer
here i have 1 more doubt, suppose if i do initialize it will replace the 4 bytes data with spaces but how the user will know that he has to enter only 4 bytes???

can you please explain sample code..... apologies if i am wrong

Re: How to remove underscores in the map???

PostPosted: Tue Aug 28, 2012 4:54 pm
by enrico-sorichetti
1) have some filler ( underscores/dots) to hint the end user about the <field> size
2) have blanks with no hint ...
it' s up to You ... You cannot have both

Re: How to remove underscores in the map???

PostPosted: Tue Aug 28, 2012 5:06 pm
by Robert Sample
how the user will know that he has to enter only 4 bytes???
If you code the map properly, there will be an autoskip field starting after the 4 bytes the user can enter. When the cursor jumps to the next field, that is a good clue to the user that no more data can be entered into the field. This is all part of the very basics of CICS screen design and should be covered in a class; if you are not taking a class then you need to find one to take. The class would also teach you about input and output fields and how to edit the data being passed from the map to your program.

Re: How to remove underscores in the map???

PostPosted: Tue Aug 28, 2012 5:49 pm
by prino
And the next question will be: What's "a class"? :mrgreen:

Re: How to remove underscores in the map???

PostPosted: Tue Aug 28, 2012 5:58 pm
by rajufis_01
thanks all for your reply... suppose if the fields are declared in the map with underscores and at the same time i am adding the field to the file instead of inquiring is there any best way to achieve this without doing it with initialize or autoskip or hints.because if we are doing without intialize it will add with underscores...

apologies i am wrong
thanks in advance
Raj

Re: How to remove underscores in the map???

PostPosted: Tue Aug 28, 2012 6:43 pm
by Robert Sample
is there any best way to achieve this without doing it with initialize or autoskip or hints.because
Design principle 1: know what is possible (and not possible) with the language / tool you are using.
It sounds like what you want to do is put together a map where a field is defined as an entire line and you want some way to get the user to stop entering data after 4 bytes. If this is what you want to do, you need to give up on CICS and program on some other platform (Windows would be a good place to start). CICS maps use protected and autoskip fields to define the starting and ending locations for fields and maps initialize data fields as specified. CICS maps have been around for a good many years, and they work the way they work -- you can like it, or not like it, but you're not going to change the way they work. Use the attribute bytes and other map design features to help your user enter data into the screen.

Re: How to remove underscores in the map???

PostPosted: Tue Aug 28, 2012 7:35 pm
by rajufis_01
thanks for your reply Robert,yeah i got the answer from your reply...i was asking exactly whatver you said...