Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Creating report by scanning all the members in a pds

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Sun Feb 04, 2007 10:19 pm    Post subject: Creating report by scanning all the members in a pds
Reply with quote

Hi Everyone,
I need to create a report by all scanning all the members in a pds.
Here is my requirement
I have a pds(say 'MY.PERSNL.PDS') and i have three jobs as members in it say (JOB1,JOB2,JOB3)

Each job has number of procs depends on it function
say
JOB1
//JOB1 job ....
//....
//STEP01 EXEC JOB1PROC1
//...
//...
//STEP02 EXEC JOB1PROC2

JOB2
//JOB2 job ....
//....
//STEP01 EXEC JOB2PROC1
//...
//...
//STEP02 EXEC JOB2PROC2

JOB3
//JOB3 job ....
//....
//STEP01 EXEC JOB3PROC1
//...
//...
//STEP02 EXEC JOB3PROC2


I need a report something like
JOB1
JOB1PROC1
JOB1PROC2

JOB2
JOB2PROC1
JOB2PROC2

JOB3
JOB3PROC1
JOB3PROC2

Can anybody help????
Back to top
View user's profile Send private message

manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Mon Feb 05, 2007 1:12 pm    Post subject: Rexx code for ur need
Reply with quote

Hi Manish,

I dont knew it can be done with DFSort, if u can do the same with rexx means use the code below.just change the DSNAME alone and run it , it will produce the result as u needed,

/*************REXX****************/
'FREE ALL'
/**DATASET = MAS.A815953.CMDMDB.OLD*/
DATASET = DSN NAME
DATASET= STRIP(DATASET,,"'")
DATASET= "'"DATASET"'"
DSN = SYSDSN(DATASET)
IF DSN ='OK' THEN
DO
DSN = DATASET
X = OUTTRAP('VAR.')
DATASET = STRIP(DATASET,,"'")
"LISTDS" DSN "MEMBERS"
X = OUTTRAP('OFF')
DO I = 7 TO VAR.0
CONC = "'"DATASET"("STRIP(VAR.I)")'"
"ALLOC DA("CONC") FI(INDD) SHR REUSE"
"EXECIO * DISKR INDD (STEM X. FINIS)"
STR='EXEC'
X=0
SAY VAR.I
DO LIN = 1 TO X.0
PARSE UPPER VAR X.LIN STR1
IF INDEX(STR1,STR) > 0 THEN
DO
STR2=SUBWORD(STR1,3,1)
SAY STR2
END
END
DROP X.
"FREE F(INDD)"
END
END
ELSE
SAY 'NOT SEARCH'


Regards,
Manikandan.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Feb 05, 2007 8:44 pm    Post subject: Re: Creating report by scanning all the members in a pds
Reply with quote

I've created this as a possible solution using DFSORT:

Code:

//STEP0001 EXEC PGM=IKJEFT01
//SYSTSPRT DD   SYSOUT=*
//SYSTSIN  DD   *
PRINTDS DATASET(JCL) TITLE TODATASET(JCL.SEQ)
/*
//*
//STEP0002 EXEC PGM=ICETOOL
//IN       DD   DISP=SHR,DSN=&SYSUID..JCL.SEQ
//T1       DD   DSN=&&T1,DISP=(,PASS),UNIT=SYSDA,
//         SPACE=(CYL,(100,100),RLSE)
//T2       DD   DSN=&&T2,DISP=(,PASS),UNIT=SYSDA,
//         SPACE=(CYL,(100,100),RLSE)
//T3       DD   DSN=&&T3,DISP=(,PASS),UNIT=SYSDA,
//         SPACE=(CYL,(100,100),RLSE)
//T4       DD   DSN=&&T4,DISP=(,PASS),UNIT=SYSDA,
//         SPACE=(CYL,(100,100),RLSE)
//CONCAT   DD   DSN=*.T3,VOL=REF=*.T3,DISP=(OLD,PASS)
//         DD   DSN=*.T4,VOL=REF=*.T4,DISP=(OLD,PASS)
//T5       DD   SYSOUT=*
//DFSMSG   DD   SYSOUT=*
//TOOLMSG  DD   SYSOUT=*
//TOOLIN   DD   *
  COPY FROM(IN) USING(CTL1)
  SELECT FROM(T1) TO(T3) ON(1,8,CH) FIRST
  COPY FROM(T2) USING(CTL2)
  SORT FROM(CONCAT) USING(CTL3)
/*
//CTL1CNTL DD   *
  INREC FIELDS=(1,80,X,SEQNUM,8,ZD)
  OUTFIL FNAMES=T1,INCLUDE=(58,8,CH,EQ,C'MEMBER:'),
    BUILD=(1:66,8,82:82,8)
  OUTFIL FNAMES=T2,INCLUDE=(1,2,CH,EQ,C'//',AND,
    3,1,CH,NE,C'*',AND,
    4,68,SS,EQ,C' EXEC ',AND,4,68,SS,NE,C'PGM=')
/*
//CTL2CNTL DD   *
  OUTFIL FNAMES=T4,
    IFOUTLEN=89,
    IFTHEN=(WHEN=INIT,
      PARSE=(%01=(ENDAT=C'//',FIXLEN=2),
             %02=(ENDBEFR=C' EXEC ',FIXLEN=6),
             %03=(ENDBEFR=C',',FIXLEN=8)),
      BUILD=(%03,SQZ=(SHIFT=LEFT),82:82,8))
/*
//CTL3CNTL DD   *
  SORT FIELDS=(82,8,BI,A)
  OUTFIL FNAMES=T5,BUILD=(1,80)
/*
//*
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts Historical/statistical details for me... elixir1986 TSO/ISPF 13 Wed Aug 30, 2017 9:02 pm
No new posts Report cost in CA-dispatch Nileshkul CA Products 3 Wed Jun 07, 2017 10:32 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us