Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
What happen if we use multiple using same memory location

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

New User


Joined: 15 Oct 2005
Posts: 15
Location: pune

PostPosted: Thu Jul 20, 2006 9:46 am    Post subject: What happen if we use multiple using same memory location
Reply with quote

what will happen if we will use multiple using for same memory location.in a given program
Back to top
View user's profile Send private message

Bharanidharan

New User


Joined: 20 Jun 2005
Posts: 86
Location: Chennai, India

PostPosted: Thu Jul 20, 2006 10:01 am    Post subject: Re: multiple using
Reply with quote

USING is an assembler directive, which would provide a stencil for your data; and since your data could have any number of mappings, you can have any number of USINGs that you want. However, it is programmer's responsibility to verify the type of the data record that matches the particular type of mapping and use that.
Back to top
View user's profile Send private message
nijugopalan

New User


Joined: 15 Oct 2005
Posts: 15
Location: pune

PostPosted: Thu Jul 20, 2006 10:11 am    Post subject: Re: multiple using
Reply with quote

THANKYOU FOR YOUR REPLY.
CAN YOU EXPLAIN THE CONCEPT IN DETAIL. BECOZ BY USING MULTIPLE USING IN A PROGRAM HOW CAN WE CONTROL THE ADDRESSIBILITY
Back to top
View user's profile Send private message
Bharanidharan

New User


Joined: 20 Jun 2005
Posts: 86
Location: Chennai, India

PostPosted: Fri Jul 21, 2006 11:05 am    Post subject: Re: multiple using
Reply with quote

I am not sure if you are looking for the coding specifics. Assume you have a file that has records with multiple record structures, and you may want to use different USINGs for different scenarios. After determining which mapping to be used for the particular record, you can DROP the previous USING and use the appropriate USING. Here is an example:
A file has 3 types of records with mappings TYPE1, TYPE2, TYPE3.
Code:

PROCRECD DS    0H         
         USING TYPE1,R1   
         CLI   0(R1),C'2' 
         BE    USETYP2     
         CLI   0(R1),C'3' 
         BE    USETYP3     
  < PROCESS TYPE 1 RECORD >
         B     CONTINUE   
USETYP2  EQU   *           
         DROP  R1         
         USING TYPE2,R1   
  < PROCESS TYPE 2 RECORD >
         B     CONTINUE   
USETYP3  EQU   *           
         DROP  R1         
         USING TYPE3,R1   
  < PROCESS TYPE 3 RECORD >
         B     CONTINUE   

Since you know how your mappings are going to be available during run time beforehand (USINGs are compiler directives), you can guide your execution sequence to follow in such a way that the appropriate mapping is used to process the correct record type.
In the above example, I am forcing my process for the type of record in the appropriate place that uses the corresponding USING.
If this doesn't answer your question, please expand your question.
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us