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
 
Dataset name with timestamp as qualifier.

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

New User


Joined: 11 Jul 2008
Posts: 42
Location: USA

PostPosted: Mon Mar 29, 2010 4:13 am    Post subject: Dataset name with timestamp as qualifier.
Reply with quote

To a query posted by hyuzen on July 9 , 2005, Finding Duplicate Records, Frank presented a solution.
I used his JCL listed below.

My requirement is the same - to add date/timestamp as the last qualifier in the dataset name.

The following JCL which returns a condition code of zero, but the dataset is not created.

Am I missing something?

Code:
//ACCSXS4P JOB (124060SYS),'ACCSXS4P',
//             CLASS=A,
//             MSGCLASS=X,
//             MSGLEVEL=(1,1)
//STEP0002 EXEC PGM=SORT
//SORTIN   DD   *
//SORTOUT  DD   SYSOUT=(*,INTRDR)
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    TRAILER1=(C'//ACCSXS JOB (TEST),CLASS=A,MSGCLASS=X',/,
            C'//STEP0001 EXEC PGM=IEFBR14',/,
            C'//FILE0001',
            C' DD DSN=PHRD.TRANSFER.EMAIL',DATENS=(DMY),C'.NVSAM,',/,
            C'// UNIT=DISK,SPACE=(TRK,(5,5)),',/,
            C'// DISP=(NEW,CATLG,DELETE)')
/*
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Mar 29, 2010 5:35 am    Post subject:
Reply with quote

Does TRAILER1 respond with an empty input dataset?
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 Mar 29, 2010 5:36 am    Post subject: Reply to: Dataset name with timestamp as qualifier.
Reply with quote

Running the job as you have posted it, I see one problem. The dataset name in the job ACCSXS resolves to

PHRD.TRANSFER.EMAIL280310.NVSAM

which is of course an illegal name and causes a JCL error.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Mar 29, 2010 6:40 am    Post subject:
Reply with quote

Hi,

what does the output from generated job say ?

The job that returned a 0 condition code submits a job to the INTRDR,
this is the job that needs investigation.


Gerry
Back to top
View user's profile Send private message
Suresh Shankarakrishnan

New User


Joined: 11 Jul 2008
Posts: 42
Location: USA

PostPosted: Mon Mar 29, 2010 7:57 am    Post subject:
Reply with quote

Thanks all.

William, I believe TRAILER1 does not respond with an empty dataset since the third qualifier exceeds the maximum length for a dataset.
--------------------------------------------------------
superk,

Yes, the dataset name is invalid as you stated, and the JCL errors.
I only looked at the output under ACCSXSP and not under ACCSXS.

I shortened the third qualifier to one letter to make the name valid.

The datset created as per the JCL is PHRD.TRANSFER.A280310.NVSAM
------------------------------------------------------------
gcicchet,

INTRDR was new to me. I did not look the output under ACCSXS as stated above.
------------------------------------------------------------

The JCL listed above has the following addition -

Code:
C'// DCB=(LRECL=133,BLKSIZE=27930,RECFM=FB)'


//ACCSXS4P JOB (124060SYS),'ACCSXS4P',
//             CLASS=A,
//             MSGCLASS=X,
//             MSGLEVEL=(1,1)
//STEP0002 EXEC PGM=SORT
//SORTIN   DD   *
//SORTOUT  DD   SYSOUT=(*,INTRDR)
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    TRAILER1=(C'//ACCSXS JOB (TEST),CLASS=A,MSGCLASS=X',/,
            C'//STEP0001 EXEC PGM=IEFBR14',/,
            C'//FILE0001',
            C' DD DSN=PHRD.TRANSFER.A',DATENS=(DMY),C'.NVSAM,',/,
            C'// UNIT=DISK,SPACE=(TRK,(5,5)),',/,
            C'// DISP=(NEW,CATLG,DELETE),',/,
            C'// DCB=(LRECL=133,BLKSIZE=27930,RECFM=FB)')
/*

---------------------------------------------------------------

My requirement was to take a backup of dataset.prd for example in a dataset with timestamp as qualifier. That way, a rerun of the JCL on the 'same day' would not error.

Can a timestamp component - hhmmss (hour,minute,second) be added to the above JCL in addition to the date?

For example, the dataset name after the addition of the time component will be PHRD.TRANSFER.A280310.Bxxxxxx.NVSAM where 'xxxxxx' is the timestamp.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 29, 2010 8:18 am    Post subject:
Reply with quote

Hello,

Why not simply make sure the "previous" backup is deleted before the "current" one is created? Change the trailer to submit 2 steps - one to housekeep and the other to catalog the dataset. Then there would be no need to create a hodge-podge of datasets that will need to be managed . . .
Back to top
View user's profile Send private message
Suresh Shankarakrishnan

New User


Joined: 11 Jul 2008
Posts: 42
Location: USA

PostPosted: Mon Mar 29, 2010 4:34 pm    Post subject:
Reply with quote

Dick,

Multiple backups are required in order to help in researching data. Of course, taking backups in a GDG would be the easier option.
Back to top
View user's profile Send private message
Suresh Shankarakrishnan

New User


Joined: 11 Jul 2008
Posts: 42
Location: USA

PostPosted: Mon Mar 29, 2010 5:04 pm    Post subject:
Reply with quote

Dick,

Thanks. As you suggested, the JCL was modified to delete and recreate the dataset. It works.

This works if the job is run once a day.

If the requirement is to take backups multiple times in one day, then this will not work as each backup dataset within the same day needs to have a timestamp, but in that case, using a GDG would be easier.

Code:
//ACCSXS4P JOB (124060SYS),'ACCSXS4P',
//             CLASS=A,
//             MSGCLASS=X,
//             MSGLEVEL=(1,1)
//STEP0001 EXEC PGM=SORT
//SORTIN   DD   *
//SORTOUT  DD   SYSOUT=(*,INTRDR)
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    TRAILER1=(C'//ACCSXS JOB (TEST),CLASS=A,MSGCLASS=X',/,
            C'//STEP0000 EXEC PGM=IEFBR14',/,
            C'//DEL1 DSN=PHRD.TRANSFER.A',DATENS=(DMY),C'.NVSAM,',/,
            C'// DISP=(MOD,DELETE,DELETE),',/,
            C'// UNIT=DISK,SPACE=(TRK,0)')
/*
//STEP0002 EXEC PGM=SORT
//SORTIN   DD   *
//SORTOUT  DD   SYSOUT=(*,INTRDR)
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    TRAILER2=(C'//ACCSXS JOB (TEST),CLASS=A,MSGCLASS=X',/,
            C'//STEP0001 EXEC PGM=IEFBR14',/,
            C'//FILE0001',
            C' DD DSN=PHRD.TRANSFER.A',DATENS=(DMY),C'.NVSAM,',/,
            C'// UNIT=DISK,SPACE=(TRK,(5,5)),',/,
            C'// DISP=(NEW,CATLG,DELETE),',/,
            C'// DCB=(LRECL=133,BLKSIZE=27930,RECFM=FB)')
/*
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 29, 2010 7:08 pm    Post subject: Reply to: Dataset name with timestamp as qualifier.
Reply with quote

You're welcome - good to hear it is working icon_smile.gif

Thank you for letting us know,

d
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

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