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
 

 

Instruction in Assembler to initialise variables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
ssamineni
Warnings : 1

New User


Joined: 10 Mar 2007
Posts: 16
Location: India

PostPosted: Mon Jun 11, 2007 1:09 pm    Post subject: Instruction in Assembler to initialise variables
Reply with quote

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

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Jun 11, 2007 1:43 pm    Post subject:
Reply with quote

ssamineni,

Did you try DC instruction?
Back to top
View user's profile Send private message
ssamineni
Warnings : 1

New User


Joined: 10 Mar 2007
Posts: 16
Location: India

PostPosted: Mon Jun 11, 2007 5:27 pm    Post subject: Re: Instruction in Assembler to initialise variables
Reply with quote

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

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Jun 11, 2007 5:31 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Jun 11, 2007 6:46 pm    Post subject: Re: Instruction in Assembler to initialise variables
Reply with quote

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
View user's profile Send private message
ssamineni
Warnings : 1

New User


Joined: 10 Mar 2007
Posts: 16
Location: India

PostPosted: Mon Jun 11, 2007 7:25 pm    Post subject: Re: Instruction in Assembler to initialise variables
Reply with quote

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

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Jun 11, 2007 10:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ssamineni
Warnings : 1

New User


Joined: 10 Mar 2007
Posts: 16
Location: India

PostPosted: Tue Jun 12, 2007 9:49 am    Post subject: Re: Instruction in Assembler to initialise variables
Reply with quote

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

Active Member


Joined: 22 Aug 2006
Posts: 757
Location: Germany

PostPosted: Tue Jun 12, 2007 5:32 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jun 12, 2007 5:38 pm    Post subject:
Reply with quote

I would think an overlapping MVCL would be easier......
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 757
Location: Germany

PostPosted: Thu Jun 14, 2007 1:22 pm    Post subject:
Reply with quote

May be...

many ways leading to rome !!!
Back to top
View user's profile Send private message
ganeshptrk

New User


Joined: 04 Apr 2007
Posts: 17
Location: Chennai

PostPosted: Mon Jun 25, 2007 7:36 pm    Post subject: Re: Instruction in Assembler to initialise variables
Reply with quote

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
View user's profile Send private message
ssrinath22
Warnings : 2

New User


Joined: 08 Mar 2007
Posts: 7
Location: chennai

PostPosted: Sun Jul 01, 2007 4:40 pm    Post subject:
Reply with quote

any of thempls send me any sample programs of assembler........i wiould be thankful ..........my id is e-mail id removed
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Jul 01, 2007 5:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm
No new posts A not very Christmassy PL/I tale, wit... prino PL/I & Assembler 3 Mon Dec 26, 2016 1:01 am


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