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

How to change the length of a variable in CICS


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

New User


Joined: 14 Jul 2010
Posts: 3
Location: Chennai

PostPosted: Mon Nov 15, 2010 6:59 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Nov 15, 2010 7:07 pm
Reply with quote

And this has exactly what to do with JCL ???
Please learn to post in the correct forum
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Nov 15, 2010 7:11 pm
Reply with quote

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
View user's profile Send private message
JayanthiKannan

New User


Joined: 14 Jul 2010
Posts: 3
Location: Chennai

PostPosted: Mon Nov 15, 2010 7:20 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Mon Nov 15, 2010 8:11 pm
Reply with quote

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
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 Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Using API Gateway from CICS program CICS 0
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top