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 

I want create dataset name with date and time then copy?
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
pgorthi
Beginner


Joined: 13 Sep 2004
Posts: 33
Topics: 16

PostPosted: Thu Oct 07, 2004 10:47 am    Post subject: I want create dataset name with date and time then copy? Reply with quote

I have a requirement.
1. i want create a data set with date and time
ex:- userid.Dyymmdd.Thhmmss

2. i want to copy one file data to newly created date with time data set how?

please help me i am writing my please correct me.
Code:

 //ISCP02AT JOB (TTSOMFG0,OFF,1440,0050,0050),'PANI',               
 //             REGION=0008192K,MSGCLASS=X,CLASS=1,NOTIFY=&SYSUID   
 //STEP0100 EXEC PGM=EZACFSM1                                       
 //SYSOUT    DD SYSOUT=(*,INTRDR)                                   
 //SYSIN     DD DATA,DLM=@@                                         
 //ISCP02AT JOB (TTSOMFG0,OFF,1440,0050,0050),                     
 //             'PANI',                                             
 //             CLASS=1,                                           
 //             MSGCLASS=X,                                         
 //             MSGLEVEL=(1,1),                                     
 //             NOTIFY=&SYSUID                                     
 //STEP0100 EXEC PGM=IEFBR14                                       
 //FILE01   DD DSN=&SYSUID..D&LYYMMDD..T&LHHMMSS,                   
 //            DISP=(NEW,PASS,DELETE),                             
 //            SPACE=(CYL,(10,10),RLSE),                           
 //            DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)                 
 @@                                                                 
 //STEP0101 EXEC PGM=IEBCOPY                                       
//SYSPRINT  DD SYSOUT=*                                       
//SYSUT2    DD SPACE=(CYL,(3,3)),UNIT=SYSDA                   
//SYSUT3    DD SPACE=(CYL,(3,3)),UNIT=SYSDA                   
//SYSUT4    DD SPACE=(CYL,(3,3)),UNIT=SYSDA                   
//INLIB     DD DSN=ISCP02.TEST.AFILE,DISP=SHR                 
//OUTLIB    DD DSN=*.STEP0100.FILE01,DISP=(OLD,CATLG,DELETE) 
//SYSIN     DD *                                             
 COPY INDD=INLIB,OUTDD=OUTLIB                                 
/*                                                           

please help me.

Regards,
Pgorthi Embarassed Rolling Eyes 8) Surprised
Back to top
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Oct 07, 2004 11:03 am    Post subject: Reply with quote

pgorthi,

You don't need 2 steps to copy/create the dataset with date and time. Also you have disp parameters as pass. So at the end of the job , they get deleted. Is your ISCP02.TEST.AFILE a PDS? If it is then you need to change your allocation. Use soltion 1 for copying a sequential dataset and solution 2 for copying a PDS
Method:1

Code:

//ISCP02AT JOB (TTSOMFG0,OFF,1440,0050,0050),'PANI',               
//             REGION=0008192K,MSGCLASS=X,CLASS=1,NOTIFY=&SYSUID   
//STEP0100 EXEC PGM=EZACFSM1                                       
//SYSOUT    DD SYSOUT=(*,INTRDR)                                   
//SYSIN     DD DATA,DLM=@@                                         
//ISCP02AT JOB (TTSOMFG0,OFF,1440,0050,0050),                     
//             'PANI',                                             
//             CLASS=1,                                           
//             MSGCLASS=X,                                         
//             MSGLEVEL=(1,1),                                     
//             NOTIFY=&SYSUID                                     
//*
//STEP0100 EXEC PGM=SORT           
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=ISCP02.TEST.AFILE,
//            DISP=SHR                 
//SORTOUT  DD DSN=&SYSUID..D&LYYMMDD..T&LHHMMSS,                   
//            DISP=(NEW,CATLG,DELETE),                             
//            SPACE=(CYL,(10,10),RLSE),                           
//SYSIN     DD *                                             
  SORT FIELDS=COPY
/*
@@                                                                 


Method:2
Code:

//ISCP02AT JOB (TTSOMFG0,OFF,1440,0050,0050),'PANI',               
//             REGION=0008192K,MSGCLASS=X,CLASS=1,NOTIFY=&SYSUID   
//STEP0100 EXEC PGM=EZACFSM1                                       
//SYSOUT    DD SYSOUT=(*,INTRDR)                                   
//SYSIN     DD DATA,DLM=@@                                         
//ISCP02AT JOB (TTSOMFG0,OFF,1440,0050,0050),                     
//             'PANI',                                             
//             CLASS=1,                                           
//             MSGCLASS=X,                                         
//             MSGLEVEL=(1,1),                                     
//             NOTIFY=&SYSUID                                     
//*                                                               
//STEP0100 EXEC PGM=IEBCOPY                                       
//SYSPRINT  DD SYSOUT=*                                       
//SYSUT2    DD SPACE=(CYL,(3,3)),UNIT=SYSDA                   
//SYSUT3    DD SPACE=(CYL,(3,3)),UNIT=SYSDA                   
//SYSUT4    DD SPACE=(CYL,(3,3)),UNIT=SYSDA                   
//INLIB     DD DSN=ISCP02.TEST.AFILE,DISP=SHR                 
//OUTLIB    DD DSN=&SYSUID..D&LYYMMDD..T&LHHMMSS,                   
//             DISP=(NEW,CATLG,DELETE),                             
//             SPACE=(CYL,(10,10,50),RLSE),                           
//             DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)                 
//SYSIN     DD *                                             
  COPY INDD=INLIB,OUTDD=OUTLIB                                 
/*
@@


Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pgorthi
Beginner


Joined: 13 Sep 2004
Posts: 33
Topics: 16

PostPosted: Fri Oct 08, 2004 2:42 am    Post subject: Reply with quote

Hi Kolusu,

thanks your kind response.
ISCP02.TEST.AFILE data set is PS. i tried first method but not working.
i am getting this type of error message please correct
Code:

   1                    J E S 2  J O B  L O G  --  S Y S T E M  C P U A  --  N O D E  P M I S J R C
0
 03.16.56 JOB06760 ---- FRIDAY,    08 OCT 2004 ----
 03.16.56 JOB06760  IEFC452I ISCP02AT - JOB NOT RUN - JCL ERROR  776
0------ JES2 JOB STATISTICS ------
0           18 CARDS READ
0           32 SYSOUT PRINT RECORDS
0            0 SYSOUT PUNCH RECORDS
0            2 SYSOUT SPOOL KBYTES
0         0.00 MINUTES EXECUTION TIME
1
         1 //ISCP02AT JOB (TTSOMFG0,OFF,1440,0050,0050),                           JOB06760
           //             'PANI',
           //             CLASS=1,
           //             MSGCLASS=X,
           //             MSGLEVEL=(1,1),
           //             NOTIFY=&SYSUID
           //* $ACFJ219 ACF2 ACTIVE PMISJRC                                            ACF2
           //*
           IEFC653I SUBSTITUTION JCL - (TTSOMFG0,OFF,1440,0050,0050),'PANI',CLASS=1,MSGCLASS=X,MSGLEVEL=(1,1),
           NOTIFY=ISCP02
         2 //STEP0100 EXEC PGM=SORT
         3 //SYSOUT   DD SYSOUT=*
         4 //SORTIN   DD DSN=ISCP02.TEST.AFILE,
           //            DISP=SHR
         5 //SORTOUT  DD DSN=&SYSUID..D041008.T031656,
           //            DISP=(NEW,CATLG,DELETE),
           //            SPACE=(CYL,(10,10),RLSE),
           IEFC653I SUBSTITUTION JCL - DSN=ISCP02.D041008.T031656,DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(10,10),RLSE),
         6 //SYSIN     DD *
1
  STMT NO. MESSAGE
         5 IEFC621I EXPECTED CONTINUATION NOT RECEIVED

Embarassed Razz regards,
pgorthi
Back to top
View user's profile Send private message AIM Address
tauras_kk
Beginner


Joined: 03 Oct 2004
Posts: 4
Topics: 0

PostPosted: Fri Oct 08, 2004 5:23 am    Post subject: Reply with quote

Pgorthi,

DCB parameters are missing for your Sortout file.

Include the below
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)

after this
// SPACE=(CYL,(10,10),RLSE),
and try it again.

P.S: Though the Error has nothing to do with a DCB parameters directly, when you have a comma at the end of a JCL statement it indicates continuation and it is missing in your Sortout statement.


Cheers,
Karthik
Back to top
View user's profile Send private message
pgorthi
Beginner


Joined: 13 Sep 2004
Posts: 33
Topics: 16

PostPosted: Fri Oct 08, 2004 6:27 am    Post subject: Reply with quote

Hi Karthik,

Thanks ur suggestion. i tried inclusing the comma and excluding the comma even though it not working. what u suggested about dcb and space i included even though i am getting same problem.

regards,
pgorthi
Back to top
View user's profile Send private message AIM Address
pgorthi
Beginner


Joined: 13 Sep 2004
Posts: 33
Topics: 16

PostPosted: Fri Oct 08, 2004 10:58 am    Post subject: Reply with quote

Hi All,

method 1 and 2 bothe working fine.Thanks a lot.

regrads,
Pgorthi
Back to top
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Sat Oct 09, 2004 6:15 am    Post subject: Reply with quote

pgorthi,

I made a mistake when I had an comma coded after the space parameter on the Sortout dataset. sorry about that.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
info_seeker
Beginner


Joined: 31 Jan 2005
Posts: 27
Topics: 9

PostPosted: Thu Apr 06, 2006 4:47 pm    Post subject: Reply with quote

Hi,

I am getting SoC4 when trying to execute this job. Can anyone help plzzz?
Code:

//STEP0100 EXEC PGM=EZACFSM1                                           
//SYSOUT   DD SYSOUT=(*,INTRDR)                                         
//SYSIN    DD DATA,DLM=@@                                               
//USERIDV JOB  (XX,ccccccccccccccccccccccccccccccccccc),               
//        'CREATE',CLASS=B,MSGCLASS=X,NOTIFY=&SYSUID
//*                                                                     
//STEP0200 EXEC PGM=SYNCSORT                                           
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DSN=AAA.BBB.CCC.VSAM,DISP=SHR                     
//SORTOUT  DD DSN=XXX.YYY.D&LYYMMDD,                               
//            DISP=(MOD,CATLG,DELETE),                                 
//            SPACE=(CYL,(100,100),RLSE)                               
//SYSIN    DD *                                                         
  SORT FIELDS=COPY                                                     
/*                                                                     
@@
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Apr 07, 2006 1:00 am    Post subject: Reply with quote

Info_seeker,

When using Sort you might sometimes get an SOC4 due to Space constraint. Try reducing the amount of space allocated to your output file or redirect it to tape or try using compressed volume.

Thanks,
Phantom
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Apr 07, 2006 4:56 am    Post subject: Reply with quote

Quote:

I am getting SoC4 when trying to execute this job. Can anyone help plzzz?


info_seeker,

You need to post the error messages for us so that we can help you

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
info_seeker
Beginner


Joined: 31 Jan 2005
Posts: 27
Topics: 9

PostPosted: Fri Apr 07, 2006 8:51 am    Post subject: Reply with quote

Phantom,

When I try running the same generated JCL from spool it goes through fine. I am getting SoC4 only when second job is getting dubmitted by INTRDR.

Kolusu,

There are no messages in SYSOUT for sort. JESYSMSG is giving the message,
SYSTEM COMPLETION CODE=0C4 REASON CODE=00000011
TIME=17.46.23 SEQ=31986 CPU=0000 ASID=00B1
PSW AT TIME OF ERROR 078D0000 0001F7EA ILC 4 INTC 11
NO ACTIVE MODULE FOUND
NAME=UNKNOWN

As I said before, If I submit the generated JCL from spool, SORT goes through fine.

Thanks!!!
Back to top
View user's profile Send private message
info_seeker
Beginner


Joined: 31 Jan 2005
Posts: 27
Topics: 9

PostPosted: Fri Apr 07, 2006 9:34 am    Post subject: Reply with quote

Ooops.. I got what I was doing wrong.. Instream sort control data was not getting recognized by the job submitted through INTRDR. And so the abend. I changed instream data to point to a PDS and it works fine.

Thank you for all your help!!!
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Apr 07, 2006 9:42 am    Post subject: Reply with quote

Quote:
When using Sort you might sometimes get an SOC4 due to Space constraint.


Phantom,

You should NOT get an S0C4 due to space constraint. Is this something you actually experienced? With which sort product? Did you report it?
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
srini_igsi
Beginner


Joined: 12 May 2006
Posts: 41
Topics: 16
Location: Mumbai

PostPosted: Thu May 18, 2006 6:00 am    Post subject: Reply with quote

Hi,

'D&LYYMMDD..T&LHHMMSS', can anybody explain me a little bit abt this..??
_________________
Thanks,
-Srini
Back to top
View user's profile Send private message
srini_igsi
Beginner


Joined: 12 May 2006
Posts: 41
Topics: 16
Location: Mumbai

PostPosted: Thu May 18, 2006 6:01 am    Post subject: Reply with quote

Hi,

can anybody explain me a little bit abt this..??
'SYSOUT DD SYSOUT=(*,INTRDR)'
_________________
Thanks,
-Srini
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 -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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