IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • No replies
SystemAdmin
SystemAdmin
403 Posts

Pinned topic Call parameter for BPX1PTC

‏2012-10-10T09:27:34Z |
Can someone help me converting the following assembler code to call BPX1PTC USS routine from COBOL?

LA R15,BUFFERA Work area
ST R15,BUFA ->above
LA R15,PTAT Area mapped by BPXYPTAT
ST R15,PTATA ->above
MVC PTATEYE,=C'BPXYPTAT' Set the eye-catcher
MVC PTATLENGTH,=A(PTATUSEROFFVAL) Length of structure
MVC PTATSYSOFFSET,=A(PTATSYSOFFVAL) Sys attr offset
MVC PTATSYSLENGTH,=A(PTATSYSLENVAL) Sys attr length
MVC PTATUSEROFFSET,=A(0) User attr offset
MVC PTATUSERLENGTH,=A(0) User attr length
LOAD EP=INITRTN Get address of Init Rtn
ST R0,INITRTNA
SPACE ,
CALL BPX1PTC, +
(INITRTNA, Input: Init routine address +
BUFA, Input: Work area address +
PTATA, Input: Attr area Address BPXYPTAT +
THID, Thread ID, if Return value = 0 +
RETVAL, Return value: 0 or -1 +
RETCODE, Return code +
RSNCODE), Reason code +
VL,MF=(E,PLIST)
and the include BPXYPTAT

BPXYPTAT VARLEN=1024
  • BPXYPTAT: Pthread Attributes
  • Used By:
PTAT DSECT ,
PTATEYE DC C'BPXYPTAT' Eye Catchter
PTATLENGTH DC A(PTAT#LENGTH) Length of PTAT
PTATSYSOFFSET DC A(PTATSYSOFFVAL) Offset of SYSATTRS
PTATSYSLENGTH DC A(PTATSYSLENVAL) Length of SYSATTRS
PTATUSEROFFSET DC A(PTATUSEROFFVAL) Offset of USERATTRS
PTATUSERLENGTH DC A(L'PTATUSERATTRS) Length of USERATTRS
PTATSYSOFFVAL EQU *-PTAT Offset value of System Attribute Area
PTATSYSATTRS DS 0F System attributes
PTATDETACHSTATE DS F Detach State of thread to be created:
PTATUNDETACHED EQU 0
PTATDETACHED EQU 1
PTATWEIGHT DS F Weight of thread to be created:
PTATHEAVY EQU 0
PTATMEDIUM EQU 1
PTATSYNCTYPE DS F Synchronous processing type of thread:
PTATSYNCHRONOUS EQU 0
PTATASYNCHRONOUS EQU 1 /*
PTATSHSPMASK DS 0XL16 /*
DS XL15 /*
PTATSHSPBYTE16 DS XL1 /*
PTATSHSPINUSE EQU X'01' 0=system default used
  • 1=use mask
  • default shared subpools 1, 2, 78
PTATSYSLENVAL EQU *-PTATSYSATTRS Length of System Attributes
PTATUSEROFFVAL EQU *-PTAT Offset of user attribute area
PTATUSERATTRS DS CL1024 User attributes area
PTAT#LENGTH EQU *-PTAT Length of this structure
  • BPXYPTAT End