Constant Field Values


Contents
vs.starlet.*

vs.starlet.STS
public static final int sts$k_error 2
public static final int STS$K_ERROR 2
public static final int sts$k_info 3
public static final int STS$K_INFO 3
public static final int sts$k_severe 4
public static final int STS$K_SEVERE 4
public static final int sts$k_success 1
public static final int STS$K_SUCCESS 1
public static final int sts$k_warning 0
public static final int STS$K_WARNING 0
public static final int sts$m_code 32760
public static final int STS$M_CODE 32760
public static final int sts$m_cond_id 268435448
public static final int STS$M_COND_ID 268435448
public static final int sts$m_control -268435456
public static final int STS$M_CONTROL -268435456
public static final int sts$m_cust_def 134217728
public static final int STS$M_CUST_DEF 134217728
public static final int sts$m_fac_no 268369920
public static final int STS$M_FAC_NO 268369920
public static final int sts$m_fac_sp 32768
public static final int STS$M_FAC_SP 32768
public static final int sts$m_inhib_msg 268435456
public static final int STS$M_INHIB_MSG 268435456
public static final int sts$m_msg_no 65528
public static final int STS$M_MSG_NO 65528
public static final int sts$m_severity 7
public static final int STS$M_SEVERITY 7
public static final int sts$m_success 1
public static final int STS$M_SUCCESS 1
public static final int sts$s_code 12
public static final int STS$S_CODE 12
public static final int sts$s_cond_id 25
public static final int STS$S_COND_ID 25
public static final int sts$s_control 4
public static final int STS$S_CONTROL 4
public static final int sts$s_fac_no 12
public static final int STS$S_FAC_NO 12
public static final int sts$s_msg_no 13
public static final int STS$S_MSG_NO 13
public static final int sts$s_severity 3
public static final int STS$S_SEVERITY 3
public static final int sts$s_stsdef 4
public static final int STS$S_STSDEF 4



dU>furtherinSection2.4.!2.3ArgumentU>PassingMechanismsBefore^discussingtheactualcallmechanismbetweenJ2VMSSandnativeOpenVMS"it"isimportanttorstcoverargumentpassing.J2VMSprovidesasetofclassesthatallowthecallertopassargumentsinthecommonlanguageenvironment,:justastheywouldanativelanguage.-TheseclassesU>are:vs.ByDescU>-bydescriptorvs.ByRefU>-byreferencevs.ByValU>-byvaluePassingargumentsusingJ2VMSܲcanbelikenedtoconstructinganargument˙listfortheLIB$Run-TimeLibraryfunctionLIB$CALLG.Annarrayofpointersand/orvaluesisconstructedandpassedtothetargetroutineusingLIB$CALLGasacatalyst(originallyhighlevellanguagepaccesstotheVAXpCALLGinstruction).7 J2VMSispquitesimilarB.HoweverB,gitd.hasit'GsminordifferencesmostlyrelatedtotheobjectorientedarchitectureU>ofJava.22ItuVQlDevelopingU>AnApplicationyj=J2VMSDargumentYlistsareconstructedasanarrayofobjectsfromthe abstractOclassvs.VMSparam.!UnlikeanargumentlistdestinedforLIB$CALLGptherepisnoneedfortheargumentcountintherstelementas thesizeofthearrayisknown,}thankstoJava.Thismeansthatallelementsintheargumentlistdetailarguments.}EachelementconsistsofSanargumentmechanismclass(shownabove)thatinformsJ2VMSEasto}exactlyhowit'Gsownargumentistobepassed.PWhenJ2VMS}actuallyperformsthecallitdeterminesthemechanismbycomparingclasstypesandthenallocatinginternalstorageasnecessary.CCopyingbetweeninternallstorageandJavaclassstoragebeforeandaftertheactualnativecall.vs.VMSparamU>ArgumentListforLIB$CHARa1 ff6fStringBufferresult=newStringBuffer(); 6Bytecode=newByte((byte)65);6vs.VMSparamarglst=newVMSparam[]{newByDesc(result),fnnewByRef(code)};TheLIB$Run-TimeLibraryroutineLIB$CHARacceptstwoarguments. TheuMrstisaresultstring,}PpassedbydescriptorB,andthesecondisabytecontainingU>an8-bitASCIIcharactercode.26fdeclarearglst(2)pointer; 6declare1result,\fh2dsc$w_lengthfixedbinary(15),\fh2dsc$b_dtypefixedbinary(7),\fh2dsc$b_classfixedbinary(7),\fh2dsc$a_pointerpointer;6declareresult_strcharacter(dsc$w_length)based(dsc$a_pointer);6declarecodefixedbinary(7);6result.dsc$w_length=0;6result.dsc$b_dtype=DSC$K_DTYPE_T;6result.dsc$b_class=DSC$K_CLASS_D;6result.dsc$a_pointer=null();6arglst(1)=addr(result);6arglst(2)=addr(code);ThecabovesnippetofPL/Iccodeattemptstodemonstratetheactionsofthe codegaboveinanativelanguage.$InthisexamplethestringdescriptorforresultxisconstructedexplictlytoshowwhatJ2VMSxdoesinternallywhendealingU>withanargumentpassedbydescriptorB.Thefollowingsectionscovereachofthemechanismsinclose.Thesesectionsʴmustbereadcarefullyasthereareoneortwocaveatsthatmustbeobserved.Forfulldocumentationofwhatdatatypeseachpassingmechanismclasscandealwith,pleaseconsulttheJ2VMSAPISpecication.Thisdocumentationshipswiththesoftwareproductandis}availableattheKednoswebsite.t~SeeAssociatedDocumentsformoredetails.Q23TuDevelopingU>AnApplicationy2.3.1PassingU>ArgumentsByDescriptorTheCclassvs.ByDescisusedtoinformJ2VMS4thatit'Gsargumentshould bepassedbydescriptorB.+Manydatatypescanbepassedbydescriptor.HoweverB,YprobablyXUthemostusedarevs.Cmem,java.lang.StringBufferandbyte[]S.1zBothmvs.Cmemandbyte[] resultinxedlengthdescriptorsoftypeDSC$K_CLASS_S.ijava.lang.StringBufferisaspecialcase.)Itresultsinadynamic_ystringdescriptorwithatypeofDSC$K_CLASS_D.Priortoacallther^contentoftheStringBufferobjectiscopiedintoadynamicdescriptorB.Thenfollowingthereturnfromthecallthestringdescriptoriscopiedback{intotheStringBufferobjectsotheresultitcanbeusedintheJavaenvironment.Alliobjectsandarrayspassedbydescriptorcanbeusedtoreceiveresults,withoneexception.9Thevs.ByDescconstructorforthejava.lang.Stringobjectq cannotbeusedtoreceivearesult.7ThisisarestrictionimposedbyJava,{DnotsJ2VMS.ThereisnopublicmethodforupdatingthecontentsofaYStringobject. nInthecasewhereastringobjectispassedbydescriptoritresultsjAinanewbytearraybeingallocatedandthecontentsoftheStringobjectWbbeingcopiedintoit.GTheexamplebelowdemonstrateswhatactuallyhappens.Exampleq2\1showsaliteraljava.lang.StringobjectbeingpassedtotheLIB$Run-TimeLibraryroutineLIB$PUT_OUTPUTz.Thisexampledemonstrates4"theconvenienceofbeingabletopassstringliteralsandhavethemU>built"intheargumentlist".=ߙExampleU>2\1$PassingU>ajava.lang.StringObjectbyDescriptor _ffflib.lib$put_output(newVMSparam[]{ fknewByDesc("hello,"+"world")37});_ uHoweverB,)itisnotpossibletoreceivedataintoaStringobject.Example2\2isacompleteprogramthatcanbecopiedandexecutedtodemonstratetherestriction.qThisexampleqisalsoavailablefromtheKednoswebsite,N=oronlineatSYS$COMMON:[SYSHLP.EXAMPLES.J2VMS]GET2.JAVA.TaGable2\1summarisesthenativeusageofJavaobjecttypespassedbydescriptorB.24`uVQlDevelopingU>AnApplicationyExampleU>2\2$ReceivingU>StringDataFromACalledRoutine _fffimportjava.lang.*; importvs.*;publicclassget2{34publicstaticvoidmain(String[]args)34{fhShortresult_len=newShort((short)0);fhStringresult1=newString();fhStringBufferresult2=newStringBuffer();fhLibRoutineslib=newLibRoutines();fhSystem.out.println("StoragebeforeanycallstoLIB$PUT_OUTPUT");fhSystem.out.println(" *result_len="+result_len);fhSystem.out.println(" *result1=<"+result1+">");fhSystem.out.println(" *result2=<"+result2+">");fhlib.lib$get_input(newVMSparam[]{ newByDesc(result1), newByDesc("Stringresult>>"), newByRef(result_len) });fhSystem.out.println("StorageafterfirstcalltoLIB$PUT_OUTPUT");fhSystem.out.println(" *result_len="+result_len);fhSystem.out.println(" *result1=<"+result1+">");fhSystem.out.println(" *result2=<"+result2+">");fhlib.lib$get_input(newVMSparam[]{ newByDesc(result2), newByDesc("Stringresult>>"), newByRef(result_len) });fhSystem.out.println("StorageaftersecondcalltoLIB$PUT_OUTPUT");fhSystem.out.println(" *result_len="+result_len);fhSystem.out.println(" *result1=<"+result1+">");fhSystem.out.println(" *result2=<"+result2+">");34}}_Q25juDevelopingAnApplicationyTBableU>2\1dSummaryofNativeUsageofJavaObjectsPassedby dDescriptor_ JavaClass/PrimitiveTUypePDescriptorClassWևritable_ byte[] PStatic(DSC$K_CLASS_S) Y,es int[] PStatic(DSC$K_CLASS_S) Y,es long[] PStatic(DSC$K_CLASS_S) Y,es short[] PStatic(DSC$K_CLASS_S) Y,es java.lang.Byte PStatic(DSC$K_CLASS_S) Y,es java.lang.Integer PStatic(DSC$K_CLASS_S) Y,es java.lang.Long PStatic(DSC$K_CLASS_S) Y,es java.lang.Short PStatic(DSC$K_CLASS_S) Y,es java.lang.String PStatic(DSC$K_CLASS_S) No java.lang.StringBuffer PDynamic(DSC$K_CLASS_D) Y,es vs.Cmem PStatic(DSC$K_CLASS_S) Y,es vs.VmsStruct PStatic(DSC$K_CLASS_S) Y,es_nǯy? centbNote:Therexiscurrentlynosupportforpassingarraysbydescriptorin the~samewayasothernativehighlevellanguages.SwCurrentlyallarraysofprimitivetypesaretreatedasbyte[] Iarrays.HoweverB,supportU>isplannedinafuturerelease.&2.3.2PassingU>ArgumentsByReferenceTheUJ2VMS?classvs.ByRefisusedtopassargumentsbyreference(byaddress).9Itqcanbeusedtopassmanydatatypes.TaGable2\2summariseseachU>ofthesupportedtypesandtheirusagebynativeroutines.%TBableU>2\2dSummaryofNativeUsageofJavaObjectsPassedbydDescriptor_ JavaClass/PrimitiveTUypePWևriteable_bytePNo int PNo long PNo short PNo byte[] PY,es int[] PY,es long[] PY,es short[] PY,es java.lang.Byte PY,es java.lang.Integer PY,es java.lang.Long PY,es26qȠuVQlDevelopingU>AnApplicationyTBableU>2\2(Cont.)SummaryaofNativeUsageofJavaObjectsPassedby Descriptor_ JavaClass/PrimitiveTUypePWևriteable_ java.lang.Short PY,es java.lang.String PNo vs.Cmem PY,es vs.VmsStruct PY,es_nǯNote:Thereiscurrentlynosupportfo