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

Problem during attach


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
girishms

New User


Joined: 06 Jun 2008
Posts: 21
Location: chennai

PostPosted: Thu Jul 24, 2008 10:18 am
Reply with quote

Hi all...

here is my problem. I have a LE asm program, which attaches a LE driver. Each time this driver is attached i am passing diff parameter to it. This driver is a single program, which i am attaching 4 times continuously with diff parameter each time. But the problem is, after i do all attaches, the first attach waht i did is taking the parameter passed for the last attach. same is the case with the 2nd and third attaches. For ex.. for the first attach i want to pass a name T1, for 2nd attach T2 and so on... but after i continuously attach 4 times with diff paramater, each attached driver is taking parameter as T4, i mean the last one..

Can anybody help me out in this?? may be some problem with register values...

Thanks,
Girish
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Jul 24, 2008 1:01 pm
Reply with quote

Hi girishms !

Perhaps it would come out more clearly, what you want do to, if you just
put your coding here.

Normaly R15 is pointing to the EntryPointLocation of the SubProgramm, R14 is pointing to the next instruction after return of SubProgramm, and R1 has the adress of the adress of the ParameterList.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Jul 24, 2008 1:13 pm
Reply with quote

As Gerry Carroll told in an other post about this handling:


Here 3 parameters are passed to a SubProgramm. The last parameter
has the HighOrderBit, so the called programm gets the correct end of the
ParameterList. Also as you could see, R1 has the adress of the adress of the Parameter.


L R1,=A(FIRST)
ST R1,PARM1
L R1,=A(SECOND)
ST R1,PARM2
L R1,=A(THIRD)
ST R1,PARM3
OI PARM3,X'80'
L R1,=A(PARMLIST)

CALL NEXTPROG


PARMLIST DS 0F
PARM1 DS F
PARM2 DS F
PARM3 DS F
Back to top
View user's profile Send private message
girishms

New User


Joined: 06 Jun 2008
Posts: 21
Location: chennai

PostPosted: Thu Jul 24, 2008 1:52 pm
Reply with quote

Hi,

i am doing ATTACH.... not call...
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Jul 24, 2008 2:13 pm
Reply with quote

Oh f***, seams that i'm not really back on earth at this time, sorry.
So here's the link to an article which could help you.
Assembler Issue
Back to top
View user's profile Send private message
girishms

New User


Joined: 06 Jun 2008
Posts: 21
Location: chennai

PostPosted: Thu Jul 24, 2008 5:58 pm
Reply with quote

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jul 25, 2008 1:13 am
Reply with quote

is there any business reason to do Your own private multitasking ??
seldom or rather never met one
IMWTK icon_cool.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Jul 25, 2008 2:30 am
Reply with quote

Sorry, the post was not totally clear to me, so this is sort of a guess...

The ATTACH creates an asynchronous task. The main routine keeps going while the attached program is started. It probably tries to attach another task before the first attached task completes.

When you attach a program, you pass in the address of a variable. When you attach a second program, you pass in the address of a variable.

Each attached program needs its own parameter variable! You cannot use the same variable for all subtasks because all they see is the address of the parameter, not the content. If the caller changes the content between the first and second attach, it affects them both (its is the same address).
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Jul 25, 2008 2:34 am
Reply with quote

FYI. I doubt you really want an ATTACH. I think you should use the LINK macro.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top