Tuesday, February 25, 2014

UNIX Files Changed in last 24hrs

Example: Need to find a list of files that have been edited in the last 24hrs
find ./ -mtime -1 -print

Tuesday, February 11, 2014

Solaris/UNIX Compare 2 Directories

Usage:
dircmp [-ds] [-w n] dir1 dir2
Example: Compare differences in common files between dir1 and dir2
dircmp -sd src/ ../../trunk/trunk/src/ | grep different
Example: Find files that are in dir2 and NOT dir1
diff -r src/ ../../trunk/trunk/src/ | grep "Only in ../../"

Friday, October 25, 2013

GZIP & Solaris Packages

un-tar "tar.gz":
1. gzcat pkgname.tar.gz | tar xvf
Create solaris package after "untarring":
2. pkgtrans -s ./PKGs/ $HOME/pkgname.bundle all
Create zip file
3. zip -r archive_name.zip folder

Thursday, February 23, 2012

Multiple Value Parameter in Subreport

Here's the scenario--
You're using a Crystal Reports 'Command' to run your SQL statement. Next thing you know, you need one of your parameters to support "multiple" input options. Short answer, not possible with only 1 report; however, there is a work around this issue.

Performance is a huge reason as to why you would want to run an embedded parameter with your command. If you filter the data at the "Record Selection" level, the query fetches all the data first, and then applies the parameter. With the approach below, you will fetch the data CONDITIONED on your parameter. Hope this makes sense...

Here's How:
Assumptions: Crystal Reports XI
DB: Oracle 10gR2
1. Create a main report and create a parameter called - PM1.
2. Set "Allow multiple Values" flag to 'True' on PM1:
3. Create new formula call it: ConcatPM1

Copy This: "'"&Join({?PM1},"','")&"'"

4. Create new subreport with Command and create a parameter in the command called concat_param (you will link this to @ConcatPM1) and use the IN clause to set it equal to the field you're conditioning the data to:

DB_FIELD IN (?concat_param)
5. Add subreport to the Page Header of master report
6. Right Click on subreport, and select "Change Subreport Links"
7. On "Fields to link to" drag over @ConcatPM1 and tie to ?concat_param in your subreport (my screenshot is using differen names, but you should get a sense of what I mean)







8. Run your main report, everything should work now!!!

Hope this saves some time on your next project.