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 

Can tape dataset be FB or VB?

 
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
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Mon Oct 05, 2009 8:38 am    Post subject: Can tape dataset be FB or VB? Reply with quote

Hi,

I have an output FILE-A created as RECFM=FB & LRECL=31034 by a program. I convert this FILE-A to FILE-B as VB as shown below:

Code:

//SORTIN    DD DSN=FILE-A,
//             DISP=(OLD,DELETE,KEEP)                   
//*                                                     
//SORTOUT   DD DSN=FILE-B,
//             DISP=(NEW,CATLG,DELETE),                 
//             SPACE=(31038,(500,250),RLSE),
//             AVGREC=K,
//             RECFM=VB,
//             VOL=(,,,20),                             
//             MGMTCLAS=XM0004                           
//*                                                     
//SYSIN     DD *                                         
  SORT FIELDS=COPY                                       
  OUTFIL FTOV,VLTRIM=X'00'                               
/*                                                       
//*                                                     
//SYSOUT    DD SYSOUT=*


After converting it from FB to VB, I am taking backup into a TAPE dataset.

Code:

//SORTIN    DD DSN=FILE-B,
//             DISP=(SHR,KEEP,KEEP)                     
//*                                     
//SORTOUT   DD DSN=FILE-C(+1),   
//             DISP=(NEW,CATLG,DELETE),                   
//             DCB=SYSX.DSCB,                             
//             VOL=(,,,20),                               
//             UNIT=TAPEC,                               
//             DSORG=PS,                                 
//             RECFM=FB,                                 
//             LRECL=31038,                               
//             BLKSIZE=31038                             
//*                           
//SYSIN     DD *                         
 SORT FIELDS=(1,3,CH,A,
              4,10,CH,A),       
              DYNALLOC=(SYSDA,10)       
//*                                     
//SYSOUT    DD SYSOUT=*


This step fails with error "OUTPUT LRECL DIFFERS FROM SORTOUT LRECL" !! I don't know why??
Is it a must that the RECFM of TAPE to be VB?
Is the SORT FIELDS correct or should be changed to below?
Code:

//SYSIN     DD *                         
 SORT FIELDS=(5,3,CH,A,
              8,10,CH,A),       
              DYNALLOC=(SYSDA,10)       


Please help me.

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Mon Oct 05, 2009 9:14 am    Post subject: Reply with quote

You are trying to write a FB file from a FB file without the required parameters in the control statements.

A stright sort will require that the output RECFM / LRECL matches the input RECFM / LRECL unless you specifically state that you want to convert from VB to FB
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Oct 05, 2009 10:46 am    Post subject: Reply with quote

ranga_subham,

first of all you don't need 2 steps to do what you are trying to do. Never hard code the DCB properties of the sortout dataset. SORT automatically calculates it

Code:

//SORTIN    DD DSN=FILE-A,DISP=SHR
//SORTOUT   DD DSN=FILE-C(+1),   
//             DISP=(NEW,CATLG,DELETE),                   
//             VOL=(,,,20),                               
//             UNIT=TAPEC                               
//*                           
//SYSIN     DD * 
 OPTION DYNALLOC=(SYSDA,10)                             
 SORT FIELDS=(1,3,CH,A,
              4,10,CH,A)
 OUTFIL FTOV,VLTRIM=X'00'         
//*

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


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Mon Oct 05, 2009 1:54 pm    Post subject: Tried and Failed Reply with quote

Kolusu, I have tried the thing you suggested but it failed saying that SPACE parameter was not specified Sad
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Oct 05, 2009 2:36 pm    Post subject: Re: Tried and Failed Reply with quote

ranga_subham wrote:
Kolusu, I have tried the thing you suggested but it failed saying that SPACE parameter was not specified Sad


Huh? You don't provide SPACE parameters for a TAPE dataset. Did you have the UNIT=TAPEC?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Oct 06, 2009 8:04 am    Post subject: Yes Reply with quote

Kolusu, ok...let me clear the air....

We need to maintain the datasets on both DASD and TAPE. I did a mistake that I did not put the SPACE for the backup taken on DASD. That is why it was failing with JCL Error. Later, I added SPACE and that step finished successfully.

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Oct 06, 2009 9:21 am    Post subject: Wrong BLKSIZE Reply with quote

Another reason for the abend while taking backup on DASD was giving the wrong BLKSIZE. I gave both LRECL & BLKSIZE as 31038 where as it should have been 31038 and 31042 respectively.

If I have to write a SPACE for a VB file, Do I give SPACE=(BLKSIZE,(100,200),RLSE) or (LRECL,(100,200),RLSE)?

Please help.

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Oct 06, 2009 11:18 am    Post subject: Reply with quote

ranga subham wrote:
I have an output FILE-A created as RECFM=FB & LRECL=31034 by a program. I convert this FILE-A to FILE-B as VB. After converting it from FB to VB, I am taking backup into a TAPE dataset.
Code:

//SYSIN     DD *                         
 SORT FIELDS=(1,3,CH,A,
              4,10,CH,A),       
              DYNALLOC=(SYSDA,10)       
//*                                 



Ranga subham,

Did you even realize that once you convert the FB file to a VB file the first 4 bytes will be RDW and you are actually sorting on it instead of the real data?

A VB file will have the actual data in pos 5.

As for your JCL question I recommend that you stop worrying about the LRECL and BLKSIZE hardcoding. Remove them completely.

To create a DASD output file via sort use this

Code:

//SORTOUT   DD DSN=Your DASD File name,
//             DISP=(NEW,CATLG,DELETE),                   
//             UNIT=SYSDA,
//             SPACE=(CYL,(X,Y),RLSE)


To create a TAPE output file via sort use this

Code:

//SORTOUT   DD DSN=Your Tape file name,
//             DISP=(NEW,CATLG,DELETE),                   
//             VOL=(,,,20),                               
//             UNIT=TAPEC       

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


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Oct 06, 2009 1:13 pm    Post subject: Thx. Reply with quote

Ok Kolusu.......Thank you.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
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