Author Topic: Db2 data converion for expire_type  (Read 3195 times)

satishkumar83

  • Guest
Db2 data converion for expire_type
« on: October 05, 2015, 11:42:35 PM »
Hi all,

I have requirement for a reporting purpose where i need to pull up the expire_type value from ARSAG table ,i need to know whether is there a option within db2 to map the respective hexadecimal values with corresponding readable values .

ODSERVER:9.0.0.3
Db2:10.5.5
                                                                               Thanks in advance

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Db2 data converion for expire_type
« Reply #1 on: October 06, 2015, 12:52:59 AM »
Hello,

why do want to use the database directly? Do you know that you can use "ARSXML" for that type of information?? you can simply extract all application group, and take the the following attributes:

  • name
  • expirationType

The XML to use with "arsxml" is the following:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<onDemand xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ondemand.xsd">
  <applicationGroup name="_ALL" />
</onDemand>

with the following command:

Code: [Select]
arsxml export -u user -p pwd -v -i inputXML.xml -o outputXML.xml

And you'll get something like that:

Quote
<applicationGroup name="ApplicationGroupName" updateDate="06/12/13 10:48:04" updateUserid="ADMIN" enableLoadDate="false" enableQueryDate="false" enableRetrieveDate="false" agid="5287" ag_identifier="VDA" storageSet="cmodduc" expirationType="Load" maxDBRows="10000000" loadsPerTable="Multiple" dbTablespaceType="Automatic Storage" dbCompress="false" annot="false" objectSize="10000" migrateIndexKeep="0" cacheData="true" docDataLen="1000" resDataLen="Always" restoreResources="true" expirationDate="2555" migrateCache="666" migrateIndex="Never" parameterMarkers="true" updateExistingTables="false" enhancedRetManagement="false" impliedHold="false" CFSOD="false" FTI="false" CMFed="false" logRetrieval="true" logBulkRetrieval="true" logDBQueriesBefore="false" logServerPrinting="true" logIndexAdd="true" logIndexUpdate="true" logIndexDelete="true" logObjectStore="true" logObjectRetrieve="true" logAnnotAdd="true" logAnnotUpdate="true" logAnnotDelete="true" logDBQueriesAfter="false" logDBQueries="false" >
      <field name="a" type="Filter" dataType="String" expireDate="false" log="false" userExit="false" partition="false" cluster="false" appIDField="false" reference="false" pageCount="false" documentSize="false" lockdown="false" CFSOD="false" FTI="false" CMFed="false" updateable="false" stringCase="Upper" stringType="Fixed" stringLength="1" />
   </applicationGroup>

With that you'll be able to find everything you need, and even more.
And with the advantage to not bother to find all the hex code for everything in CMOD. And it will also be more future proof, since you don't need to check for each release/FP of CMOD if your script is still working as expected, in case the IBM developer needs to change something in the internal structure of the internal tables.


With ARSXML working so well today, there is less and less need to do a query in the database anymore. That way you'll be really future proof.

Cheers,
Alessandro
« Last Edit: October 06, 2015, 12:55:10 AM by Alessandro Perucchi »
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML