View previous topic :: View next topic
|
Author |
Message |
JayanthiKannan
New User
Joined: 14 Jul 2010 Posts: 3 Location: Chennai
|
|
|
|
Hi,I need to change the length of a variable in cics,Please help me
For example consider my field namely address field -40 bytes,But I want to change the length in the program as 20.How to do this? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
And this has exactly what to do with JCL ???
Please learn to post in the correct forum |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
You don't say how the variable is currently defined. Is it defined in a record structure? Defined in a BMS map? Defined elsewhere? You don't say why you want to change it, so we can't guess at what knock-on effects there may be....
The actual changing is straightforward - just find the variable in the program and change it.
Garry. |
|
Back to top |
|
|
JayanthiKannan
New User
Joined: 14 Jul 2010 Posts: 3 Location: Chennai
|
|
|
|
My variable is defined in BMS Map.Consider that I have 10 records in a map.I want my first address field to be 20 and then 40 like that(length order may change).Maximum is 40 and minimum is 20.so how can I change?In may map variable is declared as 40. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If you need two separate fields, then the map must be changed or you could instruct the user to always enter a delineator between the one single map field, such as a '/' or whatever your choosing.
Keep in mind that a given map-line has a maximum of 79-positions.
EG -
THE FIRST ADDRESS/THE SECOND ADDRESS
When you issue a RECEIVE, begin at byte 41 (first-address maximum-length) and (if the '/' is not present) proceed backwards until you find the delineator. If you don't find it, then return the map to the user as an error.
With that, your single map field will need to be a maximum of 79-bytes long (40/1/38) or you can programmatically adjust the '/' position. |
|
Back to top |
|
|
|