Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

save SAY var loop.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
italo_pm

New User


Joined: 26 Mar 2015
Posts: 37
Location: Italy

PostPosted: Sun Sep 04, 2016 3:06 am    Post subject: save SAY var loop.
Reply with quote

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
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Sun Sep 04, 2016 3:52 am    Post subject:
Reply with quote

Suggestions as to what? Please be clearer about what your problem is.
Back to top
View user's profile Send private message
sergeyken

New User


Joined: 29 Apr 2008
Posts: 37
Location: Maryland

PostPosted: Sun Sep 04, 2016 5:43 am    Post subject:
Reply with quote

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
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Sun Sep 04, 2016 8:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts EDIT END(SAVE) or CANCEL? Steve Coalbran TSO/ISPF 9 Sat Feb 06, 2016 7:11 pm
No new posts print out the correct info in LOOP? jackzhang75 CLIST & REXX 7 Wed Dec 23, 2015 10:39 pm
No new posts USS Shell script:Convert hex to binar... RSR2015 All Other Mainframe Topics 0 Fri Sep 18, 2015 2:00 am
No new posts Using different values for Skeleton d... venksiv CLIST & REXX 8 Thu Sep 03, 2015 5:28 pm
No new posts Issue with Do Loop. santosh_g CLIST & REXX 5 Tue May 12, 2015 9:24 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us