Hi All
Through no skill of my own, I've managed to cobble together some Qshell code to search spool files with a particular file name, e.g.:
This works fine, but still has a couple of inadequacies:
1. It sends a failure line for every spool file that doesn't have a match, thus scrolling a lot and separating the positive results from each other
but more importantly:
2. It doesn't actually identify which spool file the displayed string was found in.
I got most of the code from here.
So I would like to know if the job/spool/number can be prependent or appended to the output and if the error messages can be suppressed.
One day I'll learn Qshell from the ground up but for now I need every moment to do paid projects.
Through no skill of my own, I've managed to cobble together some Qshell code to search spool files with a particular file name, e.g.:
Code:
system 'WRKSPLF SELECT([COLOR=#FF0000]usrname [/COLOR]*ALL *ALL *ALL *ALL [COLOR=#FF0000]spoolfilename[/COLOR]) PERIOD((*AVAIL *CURRENT))' | grep -i [COLOR=#FF0000]spoolfilename[/COLOR] | awk '{print "system -i \"qsh cmd('\''catsplf -j "$14"/"$2"/"$13" "$1" "$12"|grep '\'\''[COLOR=#FF0000]mysearchstring[/COLOR]'\'\'' '\'')\" "}' | sh
1. It sends a failure line for every spool file that doesn't have a match, thus scrolling a lot and separating the positive results from each other
but more importantly:
2. It doesn't actually identify which spool file the displayed string was found in.
I got most of the code from here.
So I would like to know if the job/spool/number can be prependent or appended to the output and if the error messages can be suppressed.
One day I'll learn Qshell from the ground up but for now I need every moment to do paid projects.
Comment