View previous topic :: View next topic
|
Author |
Message |
ssamineni Warnings : 1 New User
Joined: 10 Mar 2007 Posts: 16 Location: India
|
|
|
|
Hi,
Is there any instruction in Assembler to initialise variables?..
We need to initialise the map before we populate the values,currently we are moving spaces to each and every variable of map.is ther any other way to initialise any DSECT? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
ssamineni,
Did you try DC instruction? |
|
Back to top |
|
|
ssamineni Warnings : 1 New User
Joined: 10 Mar 2007 Posts: 16 Location: India
|
|
|
|
I want to inidiatliase the whole dsect in my logic of the program.I think DC can be used to intialise a single variable.Please correct me if am wrong |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
ssamineni,
Quote: |
I want to inidiatliase the whole dsect in my logic of the program |
I dont think its possible.
Quote: |
I think DC can be used to intialise a single variable.Please correct me if am wrong |
Yes you are correct. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
ssamineni wrote: |
Is there any instruction in Assembler to initialise variables?..
We need to initialise the map before we populate the values,currently we are moving spaces to each and every variable of map.is ther any other way to initialise any DSECT? |
What map fields do you want to initialize?
What do you want to initialize them to? |
|
Back to top |
|
|
ssamineni Warnings : 1 New User
Joined: 10 Mar 2007 Posts: 16 Location: India
|
|
|
|
In my CICS Assembler program,I have to intialise my BMS MAP variables before i populate the values. Currently we are initialising the variables by moving spaces in logic of the program. I am looking for some other option which can intialise the MAp rataher than individual fields |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I don't think so, Usually the fields are left low-values unless you want something in them, and movint that value does not need spaces before hand.
You can move low-values to the map group name but not spaces, that would mess up the other map fields. |
|
Back to top |
|
|
ssamineni Warnings : 1 New User
Joined: 10 Mar 2007 Posts: 16 Location: India
|
|
|
|
Thanks for the reply.
"You can move low-values to the map group name but not spaces, that would mess up the other map fields"
Could you please let me know how to do this? |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
Use this little example to clear a mapset.
Regards, UmeySan
LA R14,MAPSET ...Load Map-Adress
LA R15,MAPLNG ...Load Map-Length
If MapLength not greater 256, you could use the EX-Instruction
to clear the whole Map. Otherwise you have to code a little Loop.
If MapLength not greater 256
...BCTR R15,0
...EX R15,XCMAP
...XCMAP XC 0(0,R14),0(R14)
End-If
If MapLength greater 256
Loop
...clear the first 256,bytes
...check for the rest
...clear the next bytes
End-Loop
End-If |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I would think an overlapping MVCL would be easier...... |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
May be...
many ways leading to rome !!! |
|
Back to top |
|
|
ganeshptrk
New User
Joined: 04 Apr 2007 Posts: 17 Location: Chennai
|
|
|
|
Firstly, you cannot have DC in a DSECT. Even if you have DC, the assembler will take the declare as DS.
So to initialize all the contents of a DSECT, you to have do it in the program where you are establishing the addressability with this DSECT.
You can use MVC if the total no.of bytes is <=256 bytes, else MVCL |
|
Back to top |
|
|
ssrinath22 Warnings : 2 New User
Joined: 08 Mar 2007 Posts: 7 Location: chennai
|
|
|
|
any of thempls send me any sample programs of assembler........i wiould be thankful ..........my id is e-mail id removed |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forums,
When posting, please check your spelling. I don't know what this "any of thempls" is.
Also, it is against forum policy to post your e-mail address - there have been many p[roblems with spammers.
If you are working an assembler module and have questions, post them here and we may be able to offer suggestions. |
|
Back to top |
|
|
|