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 

Current Date and time in Dataset Name

 
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
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Mon Jun 05, 2006 12:46 am    Post subject: Current Date and time in Dataset Name Reply with quote

Hi,

I want to create a dataset names with current date and time. I searched in this forum, I found solution, while implementing I found errors. Please review my JCL and correct me.

CODE - I

Code:

//GETDATE1 JOB (2000),'GETTING DATE',CLASS=G,MSGCLASS=X,       
//         REGION=8M,NOTIFY=&SYSUID                             
//**************************************************************
//STEP0100 EXEC PGM=EZACFSM1                                   
//SYSOUT    DD SYSOUT=(*,INTRDR)                               
//SYSIN     DD DATA,DLM=@@                                     
//AR05DTE1 JOB (2000),                                         
//             'GET DATE',                                     
//             CLASS=G,                                         
//             MSGCLASS=X,                                     
//             NOTIFY=&SYSUID                                   
//*                                                             
//STEP0200 EXEC PGM=SORT,PARM='HIPRMAX=OPTIMAL'                 
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=my input file,                     
//            DISP=SHR                                         
//SORTOUT  DD DSN=&SYSUID..D&LYYMMDD..T&LHHMMSS,               
//            DISP=(NEW,CATLG,DELETE),                         
//            SPACE=(CYL,(10,10),RLSE),               
//            UNIT=TARC,                               
//            DCB=(DSCB,RECFM=FB,LRECL=653,BLKSIZE=0) 
//SYSIN    DD *                                       
 SORT FIELDS=COPY                                     
/*                                                     
@@                                                     



CODE: I Error

Code:

ICE000I J - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 22:23 ON SUN JUN
           SORT FIELDS=COPY                                                   
                      $                                                       
ICE007A P SYNTAX ERROR                                                         
ICE052I J END OF DFSORT                                                       


CODE : II
Code:

//GETDATE1 JOB (2000),'GETTING DATE',CLASS=G,MSGCLASS=X,         
//         REGION=8M,NOTIFY=&SYSUID                             
//**************************************************************
//STEP0100 EXEC PGM=EZACFSM1                                     
//SYSOUT    DD SYSOUT=(*,INTRDR)                                 
//SYSIN     DD DATA,DLM=@@                                       
//AR05DTE1 JOB (2000),                                           
//             'GET DATE',                                       
//             CLASS=G,                                         
//             MSGCLASS=X,                                       
//             NOTIFY=&SYSUID                                   
//*                                                             
//STEP0100 EXEC PGM=IEBCOPY                                     
//SYSPRINT  DD SYSOUT=*                                         
//SYSUT2    DD SPACE=(CYL,(30,30)),UNIT=SYSDA                   
//SYSUT3    DD SPACE=(CYL,(30,30)),UNIT=SYSDA                   
//SYSUT4    DD SPACE=(CYL,(30,30)),UNIT=SYSDA                   
//INLIB     DD DSN=my input file,DISP=SHR             
//OUTLIB    DD DSN=&SYSUID..D&LYYMMDD..T&LHHMMSS,   
//             DISP=(NEW,CATLG,DELETE),             
//             SPACE=(CYL,(10,10),RLSE),             
//             UNIT=TARC,                           
//             DCB=(LRECL=653,RECFM=FB,BLKSIZE=0)   
//SYSIN     DD *                                     
  COPY INDD=INLIB,OUTDD=OUTLIB                       
/*                                                   
@@                                                   


CODE : II Error

[code:1:1134e4b52e]
IEB1135I IEBCOPY FMID HDZ11G0 SERVICE LEVEL UA07761 DATED 20031212 D
IEB1035I AR05DTE1 STEP0100 22:35:38 SUN 04 JUN 2006 PARM=''
COPY INDD=INLIB,OUTDD=OUTLIB
IEB1128I *** COPYR1 (1ST PDSU PHYSICAL RECORD)
009400 0000 D5F3F0F0 F0F0F0F0 F0F14040 40404040 |N300000001 |
009410 0010 40F2F0F0 F5F0F0F0 F0F0F6F4 0000C4E2 | 20050000064 DS|
009420 0020 D4404040 0132183E 0132183E 00000000 |M |
009430 0030 00000C40 C3C9D9C3 E4C9E35E C2D240F1 | CIRCUIT;BK 1|
009440 0040 7F000000 80807FF8 00008800 0011F000 |" "8 h 0 |
009450 0050 00006A78 00006B22 02000000 00009440 |
Back to top
View user's profile Send private message Send e-mail MSN Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Mon Jun 05, 2006 12:50 am    Post subject: Reply with quote

I haven't tried this, but instead of writing to the internal reader, try this writing to a data set and review the contents of the data set to be sure that you are generating the JCL as you expect it.
Back to top
View user's profile Send private message Visit poster's website
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Mon Jun 05, 2006 1:29 am    Post subject: Current Date and time in Dataset Name Reply with quote

I tried to write into sysout, it's writing correctly. Also submitted the second step from my spool, it's sucessfully execeuted. But I submit using INTRDR, I got error.

Thanks,
Hari
Back to top
View user's profile Send private message Send e-mail MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jun 05, 2006 4:33 am    Post subject: Reply with quote

gharidoss,

Is your input file a PDS? If your are trying to copy a pds using sort then you need to provide the member name also. Try changing the following statement

Code:

//SYSOUT    DD SYSOUT=(*,INTRDR)


to
Code:

//SYSOUT    DD SYSOUT=(*,INTRDR),RECFM=FB


And re-submit the job

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


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Mon Jun 05, 2006 6:27 am    Post subject: Reply with quote

Hi Kolusu,

I modified the code, It's working fine.

Thanks a lot Kolusu....

Thanks,
Hari
_________________
http://mainframe-world.com
Back to top
View user's profile Send private message Send e-mail MSN Messenger
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Mon Jun 05, 2006 2:36 pm    Post subject: Reply with quote

Hai,

I tried running the second JCL using IEBCOPY and i was able to run successfully and got RC=0.I have got all members unloaded from input dataset set referenced by INLIB as seen in the SPOOL (the output of the step) the dataset was created by current date and time.

However when i try to browse the dataset i get the following error:
Code:

Invalid record format

I had given the same parameters for LRECL,BLKSIZE AND RECFM as seen in the Information Parameter.How can i browse the dataset ?
_________________
Shekar
Grow Technically
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
Page 1 of 1

 
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