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 

Present setup and changes need to be made.

 
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 Aug 31, 2009 11:48 am    Post subject: Present setup and changes need to be made. Reply with quote

Hi,

I want to convert a FB file of LRECL of 31034 to a VB file of LRECL of 31038.

Code:

//SORTIN    DD DSN=INPUT.FILE, 
//             DISP=(SHR,KEEP,KEEP)                       
//*                                                       
//SORTOUT   DD DSN=OUTPUT.FILE,
//             DISP=(NEW,CATLG,DELETE),                   
//             VOL=(,,,20),                               
//             UNIT=SYSDA,                               
//             DSORG=PS,                                 
//             RECFM=VB,                                 
//             LRECL=31038,                               
//             BLKSIZE=31038                             
//*                                                       
//SYSIN     DD *                                         
 SORT FIELDS=COPY                                         
 OUTFIL FTOV,VLTRIM=X'40'                                 
/*                                                       


After doing this I want to take a backup of the above output file into a TAPE dataset:

Code:

//SORTIN    DD DSN=OUTPUT.FILE,     
//             DISP=(SHR,KEEP,KEEP)                           
//*                                                           
//SORTOUT   DD DSN=OUTPUT.FILES(+1),       
//             DISP=(NEW,CATLG,DELETE),                       
//             DCB=SYS3.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)                             
/*


Please let me know whether my coding is correct or if something is wrong or to be corrected. Let me know if my question is clear / understandable.

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: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Aug 31, 2009 12:22 pm    Post subject: Reply with quote

ranga_subham,

You really don't have to code the DCB parameters for sort. Sort automatically will calculate the DCB properties from the input file or inrec/outrec formatting.

Do you need the sorting on the 2 fields when taking the backup to the tape? You can copy the same dataset 2 datasets simultaneously in a single step itself
_________________
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 Aug 31, 2009 7:11 pm    Post subject: Reply with quote

Kolusu, I did not this that it was not necessary to code DCB=( ) for SORT operation....nice tip.

Would you please suggest me how your solution would come out? I think, you want me to use OUTFIL with FNAMES to deal with this.....right?

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: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Aug 31, 2009 7:24 pm    Post subject: Reply with quote

ranga_subham,

Here is a sample of the JCL which will copy the input into 2 datasets

Code:

//STEP0100 EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD *                             
A                                           
//OUT1     DD SYSOUT=*                       
//OUT2     DD SYSOUT=*                       
//SYSIN    DD *                             
  SORT FIELDS=COPY                           
  OUTFIL FNAMES=(OUT1,OUT2),FTOV,VLTRIM=C' '
/*

_________________
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 Aug 31, 2009 9:38 pm    Post subject: Does tape recognizes FB or VB data? Reply with quote

Kolusu, The whole purpose of converting the FB file to VB file is to save the space because of huge LRECL. Once we convert the DASD file from FB to VB, we will move the converted VB file to a TAPE dataset as archive. Can we avoid intermediate process of converting the file from FB (DASD) to VB (DASD) and directly send the FB (DASD) to VB (TAPE)?

Please let me know if my requirement is confusing.

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: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Aug 31, 2009 9:45 pm    Post subject: Reply with quote

ranga_subham,

*sigh* You can directly copy on to a tape stripping of the trailing blanks and converting to VB format

try this
Code:

//STEP0100 EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN=Your input file,DISP=SHR
//SORTOUT  DD DSN=OUTPUT.FILES(+1),       
//            DISP=(NEW,CATLG,DELETE),                       
//            VOL=(,,,20),                                   
//            UNIT=TAPEC                                   
//*                                                       
//SYSIN    DD *                             
  SORT FIELDS=COPY                           
  OUTFIL FTOV,VLTRIM=C' '
/*

_________________
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 Aug 31, 2009 11:10 pm    Post subject: 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