Convert Tape to Disk to get first 500 records only



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

Convert Tape to Disk to get first 500 records only

Postby newbee77 » Thu Apr 09, 2020 9:04 pm

I am trying to run this JCL to convert a tape format dataset to a disk format dataset, however as the source dataset is too big, i want to convert only the first 500 into DISK
I run into a JCL error when i run it.
Any anyone help please ...

Here is the JCL

000100 // NEWBEE77 JOB (2533,010),'JOBSORT1',CLASS=6,MSGCLASS=X,
000200 // NOTIFY=&SYSUID
000300 //*==================================================================*
000400 //STEP001 EXEC PGM=ICETOOL
000500 //INFILE DD DSN=TAPE.SOURCE.IN.DATASET(0),
000600 // DISP=SHR
000700 //OUTFILE DD DSN=DISC.TARGET.OUT.DATASET,
000800 // DISP=(,CATLG,DELETE),
000900 // SPACE=(CYL,(1000,1000),RLSE),
001000 // DCB=*.INFILE
001100 //SYSOUT DD SYSOUT=*
001200 //TOOLMSG DD SYSOUT=*
001300 //DFSMSG DD SYSOUT=*
001400 //*
001500 //TOOLIN DD *
001600 SORT FROM(INFILE) TO(OUTFILE) USING(CTL1)
001700 /*
001800 //CTL1CNTL DD *
001900 SORT FIELDS=COPY,STOPAFT=1000000
002000 /*
002100 //*
newbee77
 
Posts: 3
Joined: Thu Apr 09, 2020 8:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Convert Tape to Disk to get first 500 records only

Postby newbee77 » Thu Apr 09, 2020 9:22 pm

quick correction, the input dataset is not a GDG, so changed line 000500

000100 // NEWBEE77 JOB (2533,010),'JOBSORT1',CLASS=6,MSGCLASS=X,
000200 // NOTIFY=&SYSUID
000300 //*==================================================================*
000400 //STEP001 EXEC PGM=ICETOOL
000500 //INFILE DD DSN=TAPE.SOURCE.IN.DATASET,
000600 // DISP=SHR
000700 //OUTFILE DD DSN=DISC.TARGET.OUT.DATASET,
000800 // DISP=(,CATLG,DELETE),
000900 // SPACE=(CYL,(1000,1000),RLSE),
001000 // DCB=*.INFILE
001100 //SYSOUT DD SYSOUT=*
001200 //TOOLMSG DD SYSOUT=*
001300 //DFSMSG DD SYSOUT=*
001400 //*
001500 //TOOLIN DD *
001600 SORT FROM(INFILE) TO(OUTFILE) USING(CTL1)
001700 /*
001800 //CTL1CNTL DD *
001900 SORT FIELDS=COPY,STOPAFT=1000000
002000 /*
002100 //*
newbee77
 
Posts: 3
Joined: Thu Apr 09, 2020 8:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Convert Tape to Disk to get first 500 records only

Postby enrico-sorichetti » Thu Apr 09, 2020 9:25 pm

nobody will help unless You tell what error You received :evil:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Convert Tape to Disk to get first 500 records only

Postby newbee77 » Thu Apr 09, 2020 9:45 pm

Ofcourse ... i am getting an abend CC0016
newbee77
 
Posts: 3
Joined: Thu Apr 09, 2020 8:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Convert Tape to Disk to get first 500 records only

Postby sergeyken » Thu Apr 09, 2020 9:50 pm

newbee77 wrote:Ofcourse ... i am getting an abend CC0016

Abend U0016 resulted from an ICETOOL/SORT error message which explained the reason of failure.

Either you need to read this message in English, and understand the reason by yourself, or you need to copy this message to this forum.

No other option is available.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Convert Tape to Disk to get first 500 records only

Postby steve-myers » Thu Apr 09, 2020 10:28 pm

  • DCB=*.DD only works if a DCB is explicitly declared in the referenced DD statement. I think your intent is to pick up the DCB attributes of the data set referenced by the DD statement. In the abstract this is a good idea, but your method is incorrect and also unnecessary as I believe the sort program will automatically do this. The correct way to do this is to specify DCB=disk-data set. DCB=tape-data set will not work.
  • It appears your SORT control statements start in column 1. The SORT operation must start in column 2 or higher.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Convert Tape to Disk to get first 500 records only

Postby NicC » Fri Apr 10, 2020 12:48 am

i am getting an abend CC0016

That is not an abend - that is a simple completion code.
If you only want 500 records why stop after 100000?
Why use ICETOOL? A simple SORT operation will do what you say you want. Did you consult the manual?

 SORT FIELDS=COPY,STOPAFT=500
 
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post