IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Get the GDG name in the report.

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> PL/I & ASSEMBLER
View previous topic :: View next topic  
Author Message
bhagyac



Joined: 17 Apr 2008
Posts: 6
Location: bangalore

Posted: Tue Jul 01, 2008 4:11 pm    Post subject: Get the GDG name in the report.  

Hi all,

Please help me with this query.
This is my JCL
Code:
STEP005  EXEC  PGM=plipgm1
STEPLIB  DD DSN=AAA.BBB.CCC.LOAD,DISP=SHR               
INFILE   DD DSN=AAA.BBB.CCC.INPUT(0),DISP=SHR
REPORT  DD DSN=AAA.BBB.CCC.REPORT(+1),     
            DISP=(,CATLG,DELETE),                         
            UNIT=(SYSDA,5),                                   
            SPACE=(CYL,(10,10)),                             
            LRECL=133,BLKSIZE=0,RECFM=FB
SYSPRINT DD SYSOUT=*


In the above JCL AAA.BBB.CCC.INPUT(0), is my input file(GDG)."plipgm" is the PL/I program. It takes the last input file and processes. I'm generating a report AAA.BBB.CCC.REPORT(+1).
In that report I want to print for which input GDG the report is generated.

Thank you.
Back to top  
UmeySan



Joined: 22 Aug 2006
Posts: 625
Location: Germany

Posted: Tue Jul 01, 2008 8:52 pm    Post subject:  

Hi bhagyac !

You could call a Assembler-Programm. This one could read the JobFileControlBlocks via RDJFCB / IHADCB to extract the komplete DSN, wich is allocated by the system.

Mostly companies have build some UtilityProgramms like this.
Ask your pers for such a programm.
Back to top  
bhagyac



Joined: 17 Apr 2008
Posts: 6
Location: bangalore

Posted: Wed Jul 02, 2008 9:29 am    Post subject:  

hi UmeySan,

Thank you. let me try to get that.

Is there any other possible method to get this?
Using REXX and PLI.. :( :?
Back to top  
expat



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Wed Jul 02, 2008 12:18 pm    Post subject:  

You can with REXX
Code:
X   = LISTDSI("DUMPREF  FILE")
DUMPDSN = SYSDSNAME
Back to top  
bhagyac



Joined: 17 Apr 2008
Posts: 6
Location: bangalore

Posted: Wed Jul 02, 2008 9:04 pm    Post subject:  

Hi expat,

Thank you for your help.

But i couldn't understand how would i use that in my above JCL.
Can you please help?

Thank you.
Back to top  
Douglas Wilder



Joined: 28 Nov 2006
Posts: 196
Location: Deerfield IL

Posted: Wed Jul 02, 2008 10:08 pm    Post subject:  

You could use the following to get the genetation number into a file, then process that file how you need to in your report:
Code: //STEP10  EXEC PGM=IDCAMS                               
//DD1       DD DSN=AAA.BBB.CCC.INPUT(0),DISP=SHR
//SYSPRINT  DD DSN=HLQ...,
//             DISP=(NEW,CATLG,DELETE),         
//             UNIT=DISK,SPACE=(TRK,(1,1),RLSE),
//             DCB=(RECFM=FB,...)
//SYSIN     DD *                                         
 PRINT INFILE(DD1) COUNT(0) CHAR                         
/*                                                       
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> PL/I & ASSEMBLER
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM