Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem while trying to save the output of a Query into a variable

Status
Not open for further replies.

rajai123

Programmer
May 5, 2005
2
US
Hi,

I'm trying to identify the latest version of a file and then compare it to all of the previouse versions. This is what I got so far


## Get the latest version of the file build_prov.sql

ccm query "is_member_of('wfm=BuildM.int.wfm') and is_hist_leaf()" -f %objectname -u |grep -i build_prov.sql'

This Query works but I need to save the results into a variable so I could use it with the commands below instead of hard coding the file name and version like I'm doing now

## Get the predecessor of the lates version
I need to replace the hard coded file with the variable with the results of the query above and save the results into another variable

ccm query "is_predecessor_of('build_prov.sql=186:ascii:lscrg!1 ')" -f "%objectname" -u

Run the diif command on both of the variables.

#ccm diff -vc build_prov.sql=186:ascii:lscrg\!1 build_prov.sql=185:ascii:lscrg\!1

the code before works but I've harded coded the versions and I'm not sure how to create the variables.

Thank you in advance for your help.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top