View previous topic :: View next topic
|
Author |
Message |
jagjit
New User
Joined: 28 Dec 2006 Posts: 18 Location: india
|
|
|
|
I am unable to open the file getting generated through jcl and it says "tape not supported" . Can I use DFSORT for creating some other file which copy the data of file so that i can able to view it |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I am unable to open the file getting generated through jcl and it says "tape not supported" |
If you say something like this, you need to post your JCL and the exact error message -- at a minimum -- to get any kind of help that is not wild guessing. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
I am guessing that jagjit was trying to browse a tape file from ISPF. (3.4) .
Jagjit,
ISPF does not support tape browsing. You need to have the file on DASD. you can use the following DFSORT JCL to copy the contents of the tape file onto a dasd file . I suggest that you copy only a few records say 1000 or else you might run into B37 space errors.
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input TAPE,DISP=SHR
//SORTOUT DD DSN=your DASD file to browse,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE)
//SYSIN DD *
OPTION COPY,STOPAFT=1000
/* |
|
|
Back to top |
|
|
jagjit
New User
Joined: 28 Dec 2006 Posts: 18 Location: india
|
|
|
|
Skolusu,
Thanks for your kind help. May i Know if it is possible to get first 100 and last 100 records of tape file in my output DASD file. Actually my tape file contains header and trailer which i need to verify. Please help for the same |
|
Back to top |
|
|
loverj24
New User
Joined: 05 Jul 2007 Posts: 16 Location: bangalore
|
|
|
|
Hi Jagjit,
You can use the following code to get Both the requirements in the same JCl.
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input TAPE,DISP=SHR
//SORTOUT DD DSN=your DASD file to browse,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE)
//SYSIN DD *
OPTION COPY,STOPAFT=1000
/*
//STEP0200 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input TAPE,DISP=SHR
//SORTOUT DD DSN=your 2nd output File,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE)
//SYSIN DD *
OPTION COPY,SKIPREC=900
/*
|
|
|
Back to top |
|
|
jagjit
New User
Joined: 28 Dec 2006 Posts: 18 Location: india
|
|
|
|
Loverj24,
Thanks. Actually i forget to add that my tape file is having say 57 lakh records so will "SKIPREC" work if i give SKIPREC=5699800 |
|
Back to top |
|
|
loverj24
New User
Joined: 05 Jul 2007 Posts: 16 Location: bangalore
|
|
|
|
Yes It will. |
|
Back to top |
|
|
jagjit
New User
Joined: 28 Dec 2006 Posts: 18 Location: india
|
|
|
|
Is it not possible to get both 1st 100 and last 100 records in the same file. As i have some 50 tape files to check. Please let me know. |
|
Back to top |
|
|
loverj24
New User
Joined: 05 Jul 2007 Posts: 16 Location: bangalore
|
|
|
|
This is what you would want to use
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input TAPE,DISP=SHR
//SORTOUT DD DSN=your 1st 100 records file,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE)
//SYSIN DD *
OPTION COPY,STOPAFT=1000
/*
//STEP0200 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input TAPE,DISP=SHR
//SORTOUT DD DSN=your 2nd records file,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE)
//SYSIN DD *
OPTION COPY,SKIPREC=900
/*
//STEPE0300 EXEC PGM=SORT
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SORTIN DD DSN=your 1st 100 records file,DISP=SHR
// DD DSN=your 2nd records file,DISP=SHR
//*
//SORTOUT DD DSN=third file having data from 1st and 2nd,
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY
/*
|
|
|
Back to top |
|
|
jagjit
New User
Joined: 28 Dec 2006 Posts: 18 Location: india
|
|
|
|
I think i am not clear in my words. let me try once again.
I have TAPE file having 50 lakhs records. In ISPF i can't view tape file so for that i will create a DASD file and using DFSORT i wil copy records from TAPE file i.e. input file to output file.
Now i want to see or move only 1st 100 and last 100 records of my TAPE input file to my DASD file.
If you see in the very first screen shot given by Skolusu he is moving 1000 records to DASD file. Instead of that i want 1st 100 and last 100 records to be moved in my output DASD file. I hope this will give you clear idea about my requirement. Thanks Loverj24 for patience. |
|
Back to top |
|
|
loverj24
New User
Joined: 05 Jul 2007 Posts: 16 Location: bangalore
|
|
|
|
Yes Jagjit, Did you try running the JCL that is given, In the Third step of the JCL you will get the file with the first 100 and the last 100. You will need to change the Skiprec and the Stopaft to the values that you want to have in the First and the second file |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
he is moving 1000 records to DASD file. Instead of that i want 1st 100 |
Jagjit,
You can always change 1000 to 100 if you want 100. Also you can modify Kolusu's job to use the same SORTOUT file in both the steps and have a
Code: |
DISP=(MOD,CATLG,DELETE) |
in 2nd step if you want to combine the results from both the steps. |
|
Back to top |
|
|
jagjit
New User
Joined: 28 Dec 2006 Posts: 18 Location: india
|
|
|
|
Thanks loverj and arun ....actually i m not mainframe guy....tats y kept u troubling... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
use the SUBSET operator
For complete details on the new SUBSET operator and the other new functions available with PTF UK90013, see:
Use [URL] BBCode for External Links
search for something like
Quote: |
SUBSET FROM(IN) TO(OUT) KEEP INPUT FIRST(100) LAST(100) |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
jagjit,
With the SKIPREC and STOPAFT solution, you have to know the number of records in the input file and figure out the SKIPREC and STOPAFT values.
You can do what you want much more easily using DFSORT's new SUBSET function. You don't have to know the number of records in the input file or do any calculations. Here's the DFSORT/ICETOOL job you can use:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=your input TAPE,DISP=SHR
//OUT DD DSN=your DASD file to browse,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE)
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) INPUT KEEP FIRST(100) LAST(100)
/*
|
You'll need z/OS DFSORT V1R5 PTF UK90013 (July, 2008) to use DFSORT's new SUBSET function. If you don't have that PTF, ask your System Programmer to install it (it's free).
For complete details on the SUBSET function and the other new functions available with PTF UK90013, see:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
|