Total Pageviews

Thursday, December 19, 2013

Hard totals in ORPOS

Hard totals contain summary of financial information that is locally available to the register.  Hard totals also contain store status and transaction information, which is required to create transactions if the register goes offline.  A set of hard totals is kept for each till, each register, and the store.  The register hard totals contain a summary of the portion of its tills’ hard totals that occurred on that register; the store’s hard totals contain a summary of its registers’ hard totals. 

Note:  The number of sets of data for tills is determined by the setting of the Accountability system setting.
If the Accountability system setting is set to Cashier, the data is collected for each till in addition to the totals for the register.  If the Accountability system setting is set to Register, the data is collected for the single till used by the register.

Facts about Hard Totals Files

1.     Hard Totals contains financial data.  This data is stored so that it is accessible locally at the register.
2.     Sequence number recycles at the maximum, for example, (9999, the next number would be 0001).
3.     Hard totals are not updated when the system is in training mode.
4.     The system automatically resets the Hard Totals when the system detects a newer business date from persistent storage.
5.     When a till that was suspended on a different register is resumed on the current register (floating till), Hard Totals are only saved for the portion of till activity that occurs on the current register for that register.
6.     Per, PABP, PCI and SOX, social security numbers must not be in the clear, unless used for PAT Cash transaction.
7.     Per, PABP and PCI, passwords must not be in the clear.
8.  Default hard total size is configured in the device configuration file.

       Parameters/Configuration

Parameter Mnemonic
Description
Valid Values
filesize
Following configuration in POSDEVICES.XML determines the default hardtotal size.

SESSIONname="SimulatedHardTotalsSession"
devicename = "defaultHardTotals"          
PROPERTY propname="fileSize"

xxxxxxxx

The following information is a preliminary set of data stored in hard totals.  Any additional data shown in hard totals is acceptable.
Note: Hard totals keep track of the number of tenders.  If tenders are split, the counts are greater than the number of transactions.
Store Information
Register Information
Till Information
Store ID
Accountability
Till ID
Location Name
Last Transaction Sequence Number
Drawer ID
Address
Current Till ID
Cashier List (Employee ID and Information for Each Cashier)

 

Workstation ID


Store ID


Location Name


Address


Training Mode (true/false)


@Kapil Pant

Friday, December 6, 2013

SVN Administration (SVN user creation and directory access)

SVN  part 2 è SVN ADMINISTRATION

1.   How to create new user

[root@localhost]# htpasswd -md /etc/opt/CollabNet_Subversion/conf/svn_auth_file èenter

Password:è@@@@@@
Renter password è@@@@@@

2. How to provide rights to user

[root@localhost]# vi /etc/opt/CollabNet_Subversion/conf/svn_access_file

Open this file you will get this

è  [\]

= r  è this user will get only read permission
= rw è this user will get read-write permission


:wq! 
2.   HOW TO START AND STOP SVN SERVER

After installation of svn server on linux platform you can check the status of this service whether it is working or not via command 
[root@localhost]# lsof | grep 3326

In case if it is not working on your system.  you can start and stop this service using below command


[root@localhost]# ./etc/init.d/collabnet_subversion [start/stop/status/restart] 


List of files changed since a certain date using SVN

svn log -r {2016-09-01}:{2011-09-04} > log.txt (only shows the revisions and comments but not the files list)

--verbose (or -v) flag and you'll get a list of all affected paths as well as the log messages. If you want to get rid of the messages, add the --quiet (or -q) flag
svn log -qv -r {2016-09-01}:{2011-09-04} > log.txt


If you just want each changed file printed once (rather than for each revision in which it was changed), you could also do:
svn diff --summarize -r {2016-09-01}:{2011-09-04} > log.txt




SVN Installation (How to install svn in Redhat-enterprise linux)

SVN  Part è 1 : INSTALLATION

How to install svn in Redhat-enterprise linux 

Pre-requisite:--

First download the require rpm (below rpm or higher available)

(a)  CollabNetSubversion-client-1.4.6-3.i386.rpm
      (b)  CollabNetSubversion-server-1.4.6-3.i386.rpm 
Caution.: - make sure to install the client rpm first then server

1. [root@kapilhost CollabNetSubversion]# rpm -ivh CollabNetSubversion-client-1.4.6-3.i386.rpm

Preparing... ########################################### [100%]
   1:CollabNetSubversion-cli########################################### [100%]

2. [root@kapilhost CollabNetSubversion]# rpm -ivh CollabNetSubversion-server-1.4.6-3.i386.rpm

Preparing..  ########################################### [100%]
   1:CollabNetSubversion-ser########################################### [100%]


Creating new repository

First take backup of following file   /etc/opt/CollabNet_Subversion/conf/svn_access_file 

*Backup required restoration purpose in future.


[root@kapilhost ~]#  cp    /etc/opt/CollabNet_Subversion/conf/svn_access_file    

                                        /etc/opt/CollabNet_Subversion/conf/svn_access_file.bak  *(backup complete)

3. [root@kapilhost~]# cd /opt/         

4. [root@kapilhostopt]# ls 
now you can see CollabNet_Subversion under /opt directory.

5. [root@kapilhostopt]# cd CollabNet_Subversion/   (go inside  CollabNet_Subversion dir using cd )

7. [root@kapilhostCollabNet_Subversion]# ls    (using ls you can see the basic directory structure of svn)

    bin  build  docs  lib  modules  share

8. [root@kapilhostCollabNet_Subversion]# cd bin/

9. [root@kapilhostbin]# ls

ab            Configure-CollabNet-Subversion  htpasswd    svnadmin
apachectl     dbmmanage                       httpd       svndumpfilter
apr-1-config  envvars                         httxt2dbm   svnlook
apu-1-config  htcacheclean                    logresolve  svnserve
apxs          htdbm                           rotatelogs  svnsync
checkgid      htdigest                        svn         svnversion


10. [root@kapilhostbin]# ./Configure-CollabNet-Subversion   (execute file to setup svn)


CollabNet Subversion Server is a free download of open-source Subversion,
compiled and tested by CollabNet. For more information about CollabNet
Subversion, visit the CollabNet community at http://open.collab.net.


Would you like to configure the CollabNet Subversion Server now? [yes] yes

Welcome to CollabNet Subversion Server setup.

You will now be asked some questions to configure CollabNet Subversion.
Defaults are given in square brackets. If a default is okay for you
Just hit [Enter] to continue.    Press enter key


This setup can configure either Apache or svnserve as Subversion
server, for you. Would you like to configure Apache as your
Subversion server now? [yes] yes

Continuing with apache Subversion server configuration ...

Specify the base directory for Subversion repositories: [/var/svn/repositories]

Non-existing base path, Let me create and continue [yes] yes

Base path created.
Would you like to create a new Subversion repository? [yes] no

Would you like to give the name and port that the server uses to identify itself? [yes] yes

Registered DNS name or IP address: 172.18.64.111

Server port number: 3326

Allow anonymous read access? [no] no

0 users currently have access to this repository:

Would you like to create a new Subversion account? [yes] no

Stopping CollabNet Subversion: httpd (no pid file) not running  [  OK  ]                                                  
Starting CollabNet Subversion:                             [  OK  ]
  Congratulations! You have successfully configured the CollabNet
  Subversion server.

  You can access your repositories at the following URL:

  http://172.18.64.111:3326/svn/YOUR-REPOS-NAME




Tuesday, February 12, 2013

Adding custom design tag using Macrodef in ANT



Below we will learn how to use custom design ANT tag,

Macrodef is one of the most powerful ways of reusing Ant code.  Macrodefs allow us to define a “private method” with “parameters”, called attributes. Most uses of "ant calls"can be replaced by macrodefs. Macrodefs allow easier code flow than trying to specify “depends” which increase faster execution of build script.

       

** Note-  "propertyregex " performs regular expression operations on an input string, and sets the results to a property.

Input- The input String to be processed.

Global-Should a replacement operation be performed on the entire string, rather than just the first occurrence .

Benefit of using Macrodef.

Suppose as a user I have to define property java.compile.rversion and I passed compiler value as 1.5 but by mistake a space or tab character comes before the compiler value. If we will use the same it will fail while compiling but if we use "triminputproperty" and pass the compiler value into this it will auto remove the space before and after the passed value string and we can use the correct value.

property name=" java.compile.version" value="  1.5" ( Input with space character) (Removed angle bracket as they are not supported by blogspot)

  (now using trim if you check the value it will 1.5 without any space)
triminputproperty property="java.compiler.trimmed" input="${java.compile.version}"  

Now using echo we can verify the output.
echo message="${java.compiler.trimmed}" 

Cheers !


Tuesday, February 5, 2013

Batch file which can run on two or more Java/Jre version

Suppose you have a requirement to install a product/application on different type of hardware some of them uses Java/Jre5 and rest of them uses Java/Jre6 and we needed a single batch or sh file which can identify version according to hardware and install the application into the machine.

Here you go, this batch file will help you to implement these kind of requirements.




@echo off
REM Author @Kapil Pant
set JAVA_VERSION=1.6
set JAVA_VERSION2=1.4
if "%JAVA_HOME%" == "" goto javahomenotfound

REM Find Java executable

if not exist "%JAVA_HOME%\bin\java.exe" goto setjre
set JAVAEXE=%JAVA_HOME%\bin\java.exe
goto setjava
:setjre

if not exist "%JAVA_HOME%\jre\bin\java.exe" goto javahomenotfound
set JAVAEXE=%JAVA_HOME%\jre\bin\java.exe
:setjava

REM Verify correct Java version is being used
"%JAVA_HOME%\bin\java" -version 2>&1  | findstr /C:"%JAVA_VERSION1%"
If %ERRORLEVEL% EQU 0 goto goodversion
"%JAVA_HOME%\bin\java" -version 2>&1  | findstr /C:"%JAVA_VERSION2%"
If %ERRORLEVEL% NEQ 0 goto badjavaversion
:goodversion
set PATH=%JAVA_HOME%\bin;%PATH%
goto EOF

:javahomenotfound
echo You must set JAVA_HOME to a JRE or JDK
goto EOF

:badjavaversion
echo
echo Required Java %JAVA_VERSION% not found under %JAVA_HOME%
goto EOF
:EOF



Thursday, August 2, 2012

How to Increase Java memory option and GC (Garbage Collector ) in POS Client or any batch file


Below command will set Java Memory option in any batch file.
set JAVA_MEM_OPTIONS=-Xms256m -Xmx512m

Below command will add garbage setting in any batch file also you can generate GC log.
set GC_OPTIONS=-XX:NewSize=85m -XX:MaxNewSize=85m -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+DisableExplicitGC -XX:+UseTLAB -Xloggc:%LOGHOME%/logs/VerboseGC.log

Note -%LOGHOME% is a variable you need to set its value somewhere in the batch file.

 Add more JAVA_OPTIONS lines to inlude more options.
set JAVA_OPTIONS=%JAVA_MEM_OPTIONS% %JAVA_OPTIONS% %GC_OPTIONS%





Wednesday, November 2, 2011

How-To Connect SquirreL to the Store and Corporate Databases


Squirrel Overview


If it becomes necessary to connect directly to the store or corporate databases, SQuirreL is considered one of the best clients to use.
SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC compliant database, browse the data in tables, issue SQL commands etc, see Getting Started and Introduction. The minimum version of Java supported is 1.6.x as of SQuirreL version 3.0. See the Old Versions page for versions of SQuirreL that will work with older versions of Java.

Assumptions

Windows XP
Java 1.6.x is installed
JAVA_HOME points to the Java 1.6.x installation


Required Software

SQuirreL
Oracle Thin JDBC driver (ojdbc6.jar)


Solution

Install SQuirreL
java -jar squirrel-sql--install.jar
Add the Oracle Driver
Click the ‘Drivers’ tab
Scroll down to ‘Oracle Thin Driver’
‘Drivers | Modify Driver…’
Click the ‘Extra Class Path’ tab
Click the ‘Add’ button
Navigate to ojdbc6.jar and click ‘Open’
Click ‘OK’
Create a New Alias for the Store Database
‘Aliases | New Alias…’
Set ‘Name’ to:
Store Database
Select ‘Oracle Thin Driver’ from the Driver drop-down list
Edit the URL to:
jdbc:oracle:thin:@orstores:1521:oretail
Set ‘User Name’ to:
bo
Set ‘Password’ to:
bo
Check the ‘Auto logon’ box
Click the ‘Test’ button
If successful, click the ‘OK’ button
Click the ‘OK’ button
Create a New Alias for the Store Database
‘Aliases | New Alias…’
Set ‘Name’ to:
Corporate Database
Select ‘Oracle Thin Driver’ from the Driver drop-down list
Edit the URL to:
jdbc:oracle:thin:@orstores:1521:oretail
Set ‘User Name’ to:
co
Set ‘Password’ to:
co
Check the ‘Auto logon’ box
Click the ‘Test’ button
If successful, click the ‘OK’ button
Click the ‘OK’ button
Connect to the Database :-
Select one of the aliases
‘Aliases | Connect’


How to connect with Offline DB..




For detail ...


        

Wednesday, October 5, 2011

CPIO (Sigcap) Device configuration with ORPOS Client

Electronic Signature Capture Pads (CPIO)

Electronic signature capture pads or cpio device and software allow you to capture digital signatures to your point of sale system.  There are few famous vendor of CPIO such as verifone , topaz ,Honeywell , Symbol, ID Tech, etc Each vendor offers different types of devices now its choice of retailer which meets there business requirements.

The installation and configuration of these devices are almost same but there are few configuration changes which vary from one device to another. Here i am covering the configuration and installation process for verifone CPIO MX850/MX860/MX870 series which is same.

CPIO Configuration :-

Driver Installation :- very first you need to install the java if it is not on your POS client machine.if it verify the version it should be jre/jdk1.5_xxx or higher.

Verifone MX860/MX850/MX870


  • Install USB Driver for your Verifone device.
  • Flash ROM, MX OS,
  • FormAgent/IBM EFT, and Retailer Screens to upload screen of CPIO .

Configure with USB Port :- First verify that USB port is open and have read only access only if not than first do it. After installing driver restart the register or your local machine connect CPIO device, right click on mycomputer than click on device manager it will display list of devices and ports, click on Ports and verify that there should be Mx860 device (COM9).

















Now you need to configure this device to Oracle POS Client

ORACLE POS Client File Configurations Changes:-

JRE Related Changes -

Ibmcomm.dll

Instructions:              Paste file in folder                                                                                                 File:                            ibmcomm.dll                                                                                                           Directory Location:   C:\Program Files\JRE6\bin\ 

(This Jre should be pointed by POS Client if there are more than one jre)
 
Javax.comm.properties

 Instructions:              Paste file in folder
 File:                            javax.comm.properties 
Directory Location:   C:\Program Files\JRE6\lib\
 * (This Jre should be pointed by POS Client if there are more than one jre)

Comm.jar

Instructions:              Paste file in folder                                                                                               File:                            comm.jar

Directory Location:   C:\Program Files\JRE6\lib\ext\

* (This Jre should be pointed by POS Client if there are more than one jre)

Jposdrivers

Instructions:              Drop folder and contents into directory structure 
Folder             :           jposdrivers or any name
Directory Location:   C:\Program Files\ or any user define location
* (These drivers entry should be inside Posenv.bat)
 

Pospal-verifone.jar

Instructions:              Paste file in folder if not
File:                            Pospal-verifone.jar
Directory Location:   ..\..\\360common\lib
Posdevices.xml
Instructions:              Replace file in folder
File:                            posdevices.xml
Directory Location:  ..\..\\pos\config\devices\

DeviceContext.xml
Instructions:              Replace file in folder
File:                            DeviceContext.xml
Directory Location:   ..\..\\pos\config\context\

Posenv.bat
Instructions:              Modify existing file
File:                            posenv.bat
Directory Location:   ..\..\pos\bin\

jpos.xml

Instructions:              Replace existing file
File:                             jpos.xml
Directory Location: ..\..\pos\bin\


Add the following to the Posenv.bat file inside ../../Client/pos/bin folder

#Set CPIO Related jars and Classes

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::

call C:\jposdrivers\jposenv.bat
SET CLASSPATH=%CLASSPATH%;%_360COMMON_PATH%\lib\pospal-common.jar;
SET CLASSPATH=%CLASSPATH%;%_360COMMON_PATH%\lib\pospal-verifone.jar;

Now test your CPIO configuration by launching ORPOS Client. :) :)

 




Monday, October 3, 2011

How to Prevent Putty Session being inactive...................

I am frequent user of putty many time when i left my desk for couples of minutes or more than 15 min sometimes there is  Putty (inactive) problem occurs, i lost control the server which i was accessing from putty. When i went to depth of this problem i found it happens because servers are usually configured to disconnect idle sessions after they are inactive for a particular time. This has many disadvantages. You can no longer monitor the jobs running in the background and the UP arrow for previous commands may not work. And you have to enter the username and password again after restarting the session.

This is how you keep it alive for longer periods
  • open putty , Right click on Putty title bar, then click onchange setting option.

  • Before saving a session, click on Connection in the left pane.

  • Enter a number, in place of zero, in the text box. as i changed from 0 to 30. Save this by pressing apply button.
  • Now go back and save your session so that this setting will be same for future .

This way, the session sends a keep-alive request to the server every 30 seconds. Hence, it stays active.

Wednesday, September 28, 2011

How to take Java Thread Dump?

A java thread dump is a way of finding out what each thread in the JVM is doing at a particular point of time. This is especially useful when your java application seems to hang when running under load. Thread dump will help you to find out where the threads are stuck.

How to take thread dump on UNIX:
First, find the process id by looking in the process table. You can generally get the process numbers of all running Java processes with the command:
ps axf | grep java
or
ps -ef | grep java | grep -v grep

Run the following command to take the thread dump.
Kill –QUIT process_id

The thread dump will be sent to where ever the standard output is redirected to. (In tomcat, normally the thread dump will be sent to TOMCAT_HOME/logs/Catalina.out)
QUIT signal does not actually kill the java process. The thread dump will be sent to the standard output and the process will continue.

How to take thread dump on Windows:
press CTRL+Break
The thread dump is printed in the command window, and you must mark and cut / paste to a separate file in order to continue working on it.



What happens when you take thread dump?
i). The Java process is paused — all threads simply stop dead in their tracks
ii)). The Main java process asks each thread in turn to give a complete account of what they’re doing
iii). The thread dump is sent to standard error, or somewhere else, depending on your Java vendor
iv)-. The Java process is unpaused — all threads simply continue where they left off.
v)-The Java process usually keeps on running, and the whole process only takes a few seconds. Any activity, even input/output is suspended. After the thread dump has completed, everything returns back to normal, just as if nothing had happened.


A sample thread dump is given below.

Monday, September 12, 2011

Windows COM Ports equivalent in Linux (Suppose if ORPOS client will run on Linux)

I shall list the Linux equivalent of the Windows COM ports. This information is asked during the configuration or installation of various softwares, so its best if you make a list of of 'Which Hardware - Which Port' for your machine, so that in future you can refer to it whenever required.

My System Setup : 
The table shows the setup one of my machine.

Remember that the translation of the Com Ports -> Linux files is the same everywhere, but your particular hardware may not be on the same Windows Com Port as this machine. What I mean is, Com 1 in Windows is /dev/ttyS0 in Linux everywhere. But the mouse need not necessarily be present on Com 1. The mouse might be present on some other Com Port. You should know which hardware is on which Windows Com Port on your machine.

My DevicesWindows Com PortLinux equivalent
MouseCOM 1/dev/ttyS0
External ModemCOM 2/dev/ttyS1
Floppy DriveNormal Floppy cable/dev/fd0
PrinterLpt Port/dev/lp0
CDROM DriveIDE cable/dev/cdrom