|
View previous topic :: View next topic
|
| Author |
Message |
italo_pm
New User
Joined: 26 Mar 2015 Posts: 37 Location: Italy
|
|
|
|
I want to know how I can do extract the result from syslog
i interrogating a CICS via syslog with this command:
/F NANECICS,CEMT I TCPIPS
F CICSWEB2,CEMT I TCPIPS
this is my output in syslog:
| Code: |
D NI0000000 OS390CX 16244 18:38:24.68 TSU01039 00000210 F CICSWEB2,CEMT I TCPIPS
D MR0000000 OS390CX 16244 18:38:24.68 JOB07063 00000010 + 524
D DR 524 00000010 TCPIPS(WEBBKUP ) OPE POR(04038) HTTP NOS TRA(CWXN)
D DR 524 00000010 CON(00000) BAC( 00300 ) MAX( 002000 ) URM( DFHWBADX )
D DR 524 00000010 TCPIPS(WEBCXINT) OPE POR(04038) HTTP NOS TRA(CWXN)
D DR 524 00000010 CON(00076) BAC( 00300 ) MAX( 002000 ) URM( DFHWBADX )
D DR 524 00000010 RESPONSE: NORMAL TIME: 18.38.25 DATE: 31.08.16
D ER 524 00000010 SYSID=WEB2 APPLID=CICSWEB2
|
i want my output in this mode:
| Code: |
TCPIPS(WEBBKUP ) OPE POR(04038) HTTP NOS TRA(CWXN)
CON(00000) BAC( 00300 ) MAX( 002000 ) URM( DFHWBADX )
TCPIPS(WEBCXINT) OPE POR(04038) HTTP NOS TRA(CWXN)
CON(00076) BAC( 00300 ) MAX( 002000 ) URM( DFHWBADX )
RESPONSE: NORMAL TIME: 18.38.25 DATE: 31.08.16
|
the problem is a list of 50 members and each cycle command in syslog screens are repeated and obtain the previous result but the new result and all data are repeated.
how to write the output in PS for each CICSNAME in this code:
SAY "OUTPUT: " lcicsweb dismr" "disdr" "lineawebnew
this is my rexx:
| Code: |
/* REXX */
/*----------------------------------------------------------------------------*/
SYSID = mvsvar('sysname')
SAY 'AMBIENTE:'SYSID
/*-----------------------------------------------*/
DSNAME = 'MYUSER.SCRIPT.TEXT.TEMPCIWB'
DSE = SYSDSN("'"STRIP(DSNAME)"'")
IF DSE <> 'OK' THEN DO
"FREE FI(TEMPCIWB)"
"ALLOC FI(TEMPCIWB) DA('"DSNAME"') NEW TRACKS SPACE(10 10) DIR(44) RECFM(F B) LRECL(80)"
END
"FREE FI(TEMPCIWB)"
"ALLOC FI(TEMPCIWB) DA('"DSNAME"(CICSWEBS)') SHR"
/*--------------------------------------------------------------------- */
ADDRESS LINK 'GSVXRXAA'
ADDRESS "SYSVIEWE" "C(PREFIX *)"
"DROPBUF"
ADDRESS "SYSVIEWE" "C(LISTJOBS CICSW*)"
i = 0
DO UNTIL QUEUED() = 0
PULL linea
tipo = LEFT(linea,1)
IF tipo = 'D' THEN DO
i = i + 1
PARSE VAR linea tipo "!" cmd "!" nomecics.i "!"
END
END
DO k = 1 TO i
say "CICS IN EXEC: "nomecics.k
END
ADDRESS 'SYSVIEWE' 'C(END)'
"EXECIO * DISKW TEMPCIWB (FINIS"
"FREE FI(TEMPCIWB)"
"DROPBUF"
/*--------------------------------------------------------------------- */
address TSO
"ALLOC FILE(CICTEMWB) DSNAME('MYUSER.SCRIPT.TEXT.TEMPCIWB(CICSWEBS)') SHR"
address TSO
"EXECIO * DISKR CICTEMWB (FINIS STEM cicsname."
"FREE FILE(CICTEMWB)"
/*--------------------------------------------------------------------- */
DO cics8= 1 TO cicsname.0
lcicsweb = SUBSTR(cicsname.cics8,1,8)
ADDRESS LINK 'GSVXRXAA'
"DROPBUF"
ADDRESS "SYSVIEWE" "C(/F "lcicsweb",CEMT I TCPIPS)"
"DROPBUF"
ADDRESS "SYSVIEWE" "C(SYSLOG)"
SAY "-------------------------------------------------------------------------------------------"
SAY "START -- CICSNAME:" lcicsweb
SAY "-------------------------------------------------------------------------------------------"
i = 0
DO WHILE QUEUED() > 0
PULL lineaweb
tipod = SUBSTR(lineaweb,3,2)
/* SAY lineaweb */
IF tipod = "NI" THEN DO
disni = SUBSTR(lineaweb,59,24)
SAY " "
SAY lcicsweb "INIZIO CMD -:"disni
END
IF tipod = 'MR' THEN DO
dismr = SUBSTR(lineaweb,61,3)
END
f=0
IF tipod = 'DR' THEN DO
disdr = SUBSTR(lineaweb,45,3)
f = f + 1
lineawebnew = SUBSTR(lineaweb,61)
END
IF tipod = 'ER' THEN DO
diser = SUBSTR(lineaweb,61)
END
IF dismr = disdr THEN DO
i = i + 1
SAY "OUTPUT: " lcicsweb dismr" "disdr" "lineawebnew
END
END /* WHILE */
SAY "-------------------------------------------------------------------------------------------"
SAY "END -- CICSNAME:" lcicsweb
SAY "-------------------------------------------------------------------------------------------"
ADDRESS "SYSVIEWE" "C(END)"
END /* cics8 */
"DROPBUF"
"FREE FILE(CICTEMWB)"
/* ------------------------------------------------------------ */
|
any suggestions
please?
Regards
Italo. |
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| Suggestions as to what? Please be clearer about what your problem is. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2276 Location: USA
|
|
|
|
Please clarify clearly how the structure of your output should look like?
Your post includes a lot of code, but lacks of clarity, or a general idea... |
|
| Back to top |
|
 |
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
Guessing from the topic title and
| Quote: |
| I want to know how I can do extract the result from syslog |
and
| Quote: |
how to write the output in PS for each CICSNAME in this code:
SAY "OUTPUT: " lcicsweb dismr" "disdr" "lineawebnew |
I think the TS is asking how to get the syslog information in a dataset, i.e output of all the display statement (SAY) in the rexx code into a dataset, but I could be wrong.
@italo_pm
If that's what you want, use a STEM variable to store the result of SAY statements and write into the dataset using that stem variable. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|