Put IEBCOPY result to QSAM.



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Put IEBCOPY result to QSAM.

Postby Mehdi shri » Tue Jun 05, 2012 11:49 am

Dear friends
I submit a job that uses IEBCOPY utility to copy a sreies of members form anywhere to another place. I Want to put SYSPRINT of the job to a QSAM for future purpose. What I must to do? Whis code I must write in my jcl?
Tahnks
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Put IEBCOPY result to QSAM.

 

Re: Put IEBCOPY result to QSAM.

Postby NicC » Tue Jun 05, 2012 11:54 am

Do you mean you want to put your SYSPRNT to an ordinary flat, sequential file? You do that the same way as you do any other data.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Put IEBCOPY result to QSAM.

Postby Mehdi shri » Tue Jun 05, 2012 3:33 pm

Dear NicC
I code this in JCL:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//COPYMEMB JOB CLASS=A,MSGCLASS=L,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//PROGS EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//IN DD DSN=USER07.PROJA.LOAD,DISP=SHR
//OUT DD DSN=OPERAT.PROJA.LOAD,DISP=SHR
//SYSIN DD *
COPY OUTDD=OUT
INDD=((IN,R))
SELECT MEMBER=(ACCTBILL)
/*
//STEP2 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD SYSOUT=T
//SYSUT2 DD DSN=USER07.TEST.QSAM.ACCTLIB,
// VOL=SER=XXYN01,DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),
// SPACE=(TRK,(1,1)),DISP=(NEW,KEEP,DELETE)
//
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
But I give Max-rc=12 on step2.
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Put IEBCOPY result to QSAM.

Postby Akatsukami » Tue Jun 05, 2012 3:53 pm

Mehdi shri wrote:Dear NicC
I code this in JCL:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//COPYMEMB  JOB  CLASS=A,MSGCLASS=L,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//PROGS        EXEC  PGM=IEBCOPY                                   
//SYSPRINT    DD SYSOUT=T                                       
//IN               DD DSN=USER07.PROJA.LOAD,DISP=SHR                   
//OUT            DD DSN=OPERAT.PROJA.LOAD,DISP=SHR       
//SYSIN DD  *                                                   
 COPY OUTDD=OUT                                                 
      INDD=((IN,R))                                             
      SELECT MEMBER=(ACCTBILL)                                   
/*                                                               
//STEP2      EXEC PGM=IEBGENER                                     
//SYSPRINT DD  SYSOUT=*                                         
//SYSIN       DD  DUMMY                                             
//SYSUT1    DD  SYSOUT=T                                         
//SYSUT2    DD DSN=USER07.TEST.QSAM.ACCTLIB,                       
//               VOL=SER=XXYN01,DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),
//               SPACE=(TRK,(1,1)),DISP=(NEW,KEEP,DELETE)         
//

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
But I give Max-rc=12 on step2.

So what you're saying is that you completely ignored what NicC wrote.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Put IEBCOPY result to QSAM.

Postby Robert Sample » Tue Jun 05, 2012 5:05 pm

Why not use
//PROGS        EXEC  PGM=IEBCOPY                                   
//SYSPRINT    DD DSN=your.dataset.name,DISP=(NEW,CATLG),
// UNIT=????,SPACE=(TRK,(1,1))                               
//IN               DD DSN=USER07.PROJA.LOAD,DISP=SHR                   
//OUT            DD DSN=OPERAT.PROJA.LOAD,DISP=SHR       
//SYSIN DD  *                                                   
 COPY OUTDD=OUT                                                 
      INDD=((IN,R))                                             
      SELECT MEMBER=(ACCTBILL)                                   
/*


Side note: if you do not know the difference between SYSOUT=T and DSN= then it's not likely you will EVER succeed at what you're trying to do.

These users thanked the author Robert Sample for the post:
Mehdi shri (Tue Jun 05, 2012 5:34 pm)
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post