Rexx script for reporting

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Anithab
Registered Member
Posts: 44
Joined: Mon May 26, 2014 2:57 pm

Rexx script for reporting

Post by Anithab »

Hi,

I have a requirement to report

Stepname,ddname,dsn,first part of disposition

For ex :

Code: Select all

//DELETE  EXEC PGM=IEFBR14
//DD01    DD  DSN=ANITHA.TEST,
//            DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1))
//DD02    DD  DSN=ANITHA.TEST2,
//            DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1))
I need a Report like

Code: Select all

DELETE;DD01;ANITHA.TEST;MOD
DELETE;DD02;ANITHA.TEST2;MOD
For programs like

Code: Select all

//DELETE  EXEC PGM=TEST
//INP01    DD  DSN=ANITHA.INP01,DISP=SHR
//         DD  DSN=ANITHA.INP02,DISP=SHR
//OUT01    DD  DSN=ANITHA.OUT01,DISP=OLD
I need report like

Code: Select all

DELETE;INP01;ANITHA.INP01;SHR
DELETE;INP01;ANITHA.INP02;SHR
DELETE;OUT01;ANITHA.OUT01;OLD
At this moment, I am able to retrieve all the values seperately but need pointers how to make them like the one report
Any suggesion will be helpful
nicc
Global Moderator
Global Moderator
Posts: 690
Joined: Wed Apr 23, 2014 8:45 pm

Re: Rexx script for reporting

Post by nicc »

Code: Select all

this = 'something'
that = 'something else'
say this that
gives:

Code: Select all

somethng something else
Suggest you read up about concatenation as that is a basic part of Rexx.
Regards
Nic
Anithab
Registered Member
Posts: 44
Joined: Mon May 26, 2014 2:57 pm

Re: Rexx script for reporting

Post by Anithab »

Thanks Nic

I am aware of the concatenation too...

The issue I am facing is

First record = ' something'
Second record = ' something else'

Though I want like

Code: Select all

something something else 
I get

Code: Select all

something blank 
something something else
Could you throw pointers on where I would have went wrong?

All I do is something like this pseudocode below

Code: Select all

Do i=1 to eof
     IF EXEC found get stepname
     IF DD found get ddname
     IF DSN found dataset_name
     IF DISP found get disp_parm
     say stepname ddname dataset_name   disp_parm    
end
Though I know the logic above is not 100% correct for getting them in one line of reporting I dont know how to correct it

Any advice will help

Thanks
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Rexx script for reporting

Post by zprogrammer »

If you are looking for pointers ;)
Try this :
1.Do a read record by record
2.You might need to store some temporary values and counts and based on which you might need be doing the write
zprogrammer
Anithab
Registered Member
Posts: 44
Joined: Mon May 26, 2014 2:57 pm

Re: Rexx script for reporting

Post by Anithab »

Hi Pandora,

I tried as suggested and I was able to acheieve what I needed.

Thanks all :)
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Rexx script for reporting

Post by zprogrammer »

Glad it worked!!
Could you also post the solution which might help others?
zprogrammer
Post Reply Previous topicNext topic

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”