MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

REXX tool.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
krk123
Beginner


Joined: 03 Jun 2003
Posts: 58
Topics: 19

PostPosted: Wed Nov 12, 2003 3:22 pm    Post subject: REXX tool. Reply with quote

Hi,
I am new to REXX. I am looking for a small REXX tool. My requirement is: I want to put a display after each paragraph in my program.

1000-open-files
display '1000-open-files'
1000-exit
display '1000-exit'.

If there are 10 paras in the program I want 10 displays. Please share the code with me if you have something similar. I can make the modifications.

Thanks,
KRK123.
Back to top
View user's profile Send private message
Ashish Jain
Beginner


Joined: 09 Dec 2002
Posts: 15
Topics: 0
Location: India

PostPosted: Thu Nov 13, 2003 5:46 am    Post subject: Reply with quote

Few days before I wrote one REXX for the same.....

Code:


/***************************** REXX **********************************/
                                                                       
  "FREE F(TSOURCE SOURCE)"                                             
                                                                       
  USR = USERID()                                                       
  /*  GIVE THE SOURCE PDS AND MEMBER NAME TO BE TRACED */               
  SRCFILE = USR || '.PDSNAME(MEMBER)'                                   
                                                                       
  "ALLOCATE DDNAME(SOURCE) DSN('"SRCFILE"') SHR"                       
  "EXECIO * DISKR SOURCE (STEM COUNT. FINIS"                           
                                                                       
  /*  GIVE THE SOURCE PDS AND MEMBER NAME TO BE TRACED */               
  TRCFILE = USR || '.PDSNAME(MEMBER)'                                   
  "ALLOC DA('"TRCFILE"') F(TSOURCE) OLD"                               
                                                                       
  IF RC \= 0 THEN                                                       
     DO                                                                 
        "ALLOC DA('"TRCFILE"') F (DOC) NEW,                             
         RECFM(F,B) LRECL(80) BLKSIZE(8000) SPACE(100,100) DSORG(PS)"   
     END                                                               
                                                                       
  COUNTER = 1                                                           
  WS1 = "*TRACE 01  PX     VALUE 'MEMBER'          PIC X(08)."         
  WS2 = "*TRACE 01  FILLER     VALUE '1'   PIC X(01)."                 
  WS3 = "*TRACE       88  DX          VALUE '1'."                       
  WS4 = "*TRACE       88  DX-OFF      VALUE '0'."                       
  GENLEFT = "*TRACE     IF DX DISPLAY PX ' - "                         
  GENRIGHT = "' END-IF."                                               
  FLAG = 0                                                             
                                                                       
  DO J = 1 TO COUNT.0                                                   
                                                                       
    LINE = COUNT.J                                                     
                                                                       
    TEMPSTR = SUBSTR(LINE,8,23)                                         
    CHAR7 = SUBSTR(LINE,7,1)                                           
    CHAR8 = SUBSTR(LINE,8,1)                                           
    CHAR9 = SUBSTR(LINE,9,1)                                           
    PROCD = SUBSTR(LINE,8,9)                                         
    GENMID = SUBSTR(LINE,8,73)                                       
    SKIP = SPACE(GENMID,0)                                           
                                                                     
    IF TEMPSTR = 'WORKING-STORAGE SECTION'  THEN DO                 
       OUT.COUNTER = LINE                                           
       COUNTER = COUNTER + 1                                         
       OUT.COUNTER = WS1                                             
       COUNTER = COUNTER + 1                                         
       OUT.COUNTER = WS2                                             
       COUNTER = COUNTER + 1                                         
       OUT.COUNTER = WS3                                             
       COUNTER = COUNTER + 1                                         
       OUT.COUNTER = WS4                                             
       COUNTER = COUNTER + 1                                         
    END                                                             
    ELSE                                                             
       IF CHAR7 /= '*' & CHAR8 /= ' ' & CHAR9 /= ' ' & FLAG = 1 & , 
          SKIP /= 'SKIP1' & SKIP /= 'EJECT' THEN DO                 
         GENMID = SPACE(GENMID,0)                                   
         PARSE VAR GENMID GENMID '.'                                 
         OUT.COUNTER = LINE                                         
         COUNTER = COUNTER + 1                                       
         OUT.COUNTER = GENLEFT || GENMID || GENRIGHT                 
         COUNTER = COUNTER + 1                                       
       END                                                           
    ELSE DO                                                         
         OUT.COUNTER = LINE                                         
         IF PROCD = 'PROCEDURE' THEN DO                             
           FLAG = 1                                                 
         END                                                         
         COUNTER = COUNTER + 1                                       
    END                                                             
                                                                     
  END /* END OF DO LOOP */                                           
                                                                     
  "EXECIO * DISKW TSOURCE (STEM OUT. FINIS"                         
   "FREE F(TSOURCE SOURCE)"                                         



You have to make some changes to make it usable for you !
Change the PDSNAME and MEMBER name accordingly.

The preview shows the code in proper format, not the actual post ! Don't know why ! You have to manage
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
krk123
Beginner


Joined: 03 Jun 2003
Posts: 58
Topics: 19

PostPosted: Thu Nov 13, 2003 8:36 am    Post subject: Reply with quote

Thaanks Ashish. I will test this and will let u know how it goes.
Thanks,
Krk123
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Thu Nov 13, 2003 8:50 am    Post subject: Reply with quote

I hope you remove those displays before the program goes production.
Back to top
View user's profile Send private message
krk123
Beginner


Joined: 03 Jun 2003
Posts: 58
Topics: 19

PostPosted: Thu Nov 13, 2003 9:28 am    Post subject: Reply with quote

Hi Taltyman,
This is just for my testing. This not not gonna go in to production.
Regards,
Krk123
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Thu Nov 13, 2003 10:55 am    Post subject: Reply with quote

Good then krk. I only mentioned it since we had lots of programs that did displays and wrote 1000s of lines of output in production. The programmers left them there 'just in case there is a problem with their code'. We've managed to get most of them re-compiled with the displays removed but a few remain.
Back to top
View user's profile Send private message
vijay
Beginner


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Wed Nov 19, 2003 3:38 pm    Post subject: Reply with quote

try this code .. .It's working for me ..

[code:1:bd4e8156a1]
ISREDIT MACRO
ISREDIT SEEK PROC 8 FIRST
IF &LASTCC = 0 THEN +
GOTO CONTNU:
ELSE
ISREDIT RESET /* RES
EXIT CODE(0)
END
CONTNU: DO
SET &LASTCC = 0
SET &MAXCC = 0
SET &MASKD = &STR(DISPLAY 'DEBUG~ )
SET &PARAOSET = 7
SET &DISPOSET = 12
END
ISREDIT SEEK P'
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group