Author Topic: File name from 127 Records  (Read 1956 times)

jsquizz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 576
    • View Profile
File name from 127 Records
« on: October 16, 2017, 06:30:09 AM »
Greetings all,

Got a request last week. Simple one, but I think my syntax is off here.

I need to match up file names that were unloaded, VIA 127 records..With file names that were loaded with the associated load ID via 87 records. I was able to get all my 127's-

$ARSDOC -u $USER -p $PASSWORD -h $HOST -f "System Log" -o $1recs.out -S 10/1/17,10/12/17 -i "WHERE msg_num ='$1'" -v

issue q 127

10/16/17 09:22:46 : Starting arsdoc.  Version:  8.5.0.6
10/16/17 09:22:46 : /usr/lpp/ars/bin/arsdoc query -u admin -h archive -f System Log -o 127recs.out -S 10/1/17,10/12/17 -i WHERE msg_num ='127' -v
10/16/17 09:22:46 : Attempting login for userid 'admin' on server 'archive' ...
10/16/17 09:22:46 : Login successful
10/16/17 09:22:46 : Searching for folder 'System Log' ...
10/16/17 09:22:46 : Search successful
10/16/17 09:22:46 : Searching for documents in 'System Log' ...
10/16/17 09:22:46 : Querying database with SQL string 'WHERE msg_num ='127''
10/16/17 09:22:46 : Search successful
10/16/17 09:22:46 : Writing 892 hits in file '127recs.out'...
10/16/17 09:22:46 : Write successful
10/16/17 09:22:46 : arsdoc completed.

New command- might be wrong with my ARSDOC here.

$ARSDOC -u $USER -p $PASSWORD -h $HOST -f "System Log" -o out.out -S 10/1/17,10/12/17 -i "WHERE msg_num ='87' and msg_text like '5323-1-0-7FAA-15612-15612'" -v

Typical command that's pointing me towards a syntax issue.

Usage: arsdoc query -h hostname [-u <userid>] [-p <passwd>] [-U <user_alias>] [-v] (-F <parmfile> | ((-i <sql_query> | -q <namedquery> | -X <load_id>) [-x <load_id>] [-B <order_by_clause>] [-f <foldername>] [-G <name>] [-l <holdname>] [-e <delim>] [-H] [-I <type>] [-N <(field1)>][-n] [-o <filename>] [-d <dir>] [-L <max_hits>] [-S <startdate,enddate[,format]>]))
Version:  8.5.0.6

Am I thinking to hard with this one?




#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING

Nolan

  • Full Member
  • ***
  • Posts: 152
    • View Profile
Re: File name from 127 Records
« Reply #1 on: October 16, 2017, 08:51:32 AM »
Not sure why you are getting the Syntax error but your like statement will need a percent sign at the beginning and end to work.

msg_text like '%5323-1-0-7FAA-15612-15612%'

As with most syntax issues, I suggest you break it down to isolate where it is incorrect.
J.

#zOS #AIX #Windows #Multiplatforms
#DB2 #TSM #ODF #zODF #ODWEK
#CapacityPlanning #AFP #ReportDistribution
#Finance #ICN

jsquizz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: File name from 127 Records
« Reply #2 on: October 16, 2017, 09:45:06 AM »
Thanks Nolan.

WHY MUST IT ALWAYS BE SOMETHING SO SIMPLE.

 >:( >:( >:( >:( >:( >:(
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING