AnsweredAssumed Answered

PREP_PROCESS_REPORT - having difficulty extracting count value

Question asked by JohnO'Mullane on Oct 6, 2016
Latest reply on Oct 7, 2016 by Wolfgang_Brueckler_1288
Hi,
I have a simple Unix Job that is executing the following command

bckdatacnt=`ls -l /db/backup/xmeprd_oradata/*|wc -l `
echo "BackupCount=$bckdatacnt"

The report that get's generated is as follows

bckdatacnt=`ls -l /db/backup/xmeprd_oradata/*|wc -l ` 
ls -l /db/backup/xmeprd_oradata/*|wc -l 
++ wc -l
++ ls -l /db/backup/xmeprd_oradata/dbpassman_data01.dbf /db/backup/xmeprd_oradata/dbpassman_index01.DBF /db/backup/xmeprd_oradata/dg_config /db/backup/xmeprd_oradata/restore_symboltable /db/backup/xmeprd_oradata/sysaux01.dbf /db/backup/xmeprd_oradata/system01.dbf /db/backup/xmeprd_oradata/temp01.dbf /db/backup/xmeprd_oradata/undotbs01.dbf /db/backup/xmeprd_oradata/users01.dbf /db/backup/xmeprd_oradata/user_space01.dbf /db/backup/xmeprd_oradata/wrangler01.dbf /db/backup/xmeprd_oradata/xmeprd.trc /db/backup/xmeprd_oradata/xssd01.dbf /db/backup/xmeprd_oradata/XXDBD_IDM_SOA01.DBF /db/backup/xmeprd_oradata/xxmobile01.dbf
+ bckdatacnt=19
echo "BackupCount=$bckdatacnt"
+ echo BackupCount=19
BackupCount=19

I'm trying to extract the count above in bold

Can someone please help me with the syntax of my PREP_PROCESS_REPORT in my Post Process that will extract the count above? I only want the count and not the entire line "BackupCount=19"

To get the entire line I used

 :SET &HND# = PREP_PROCESS_REPORT(JOBS, , REP, "BackupCount=*")
 :PROCESS &HND#
:   PSET &BACKUP_COUNT# = GET_PROCESS_LINE(&HND#,1)
:ENDPROCESS

Thanks,
John.

Outcomes