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 to change the length of a variable in CICS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: How to change the length of a variable in CICS
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: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 15, 2010 7:07 pm    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Nov 15, 2010 7:11 pm    Post subject:
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Nov 15, 2010 8:11 pm    Post subject: Reply to: How to change the length of a variable in CICS
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    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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


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