convert a VB file to a VB file lower



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

convert a VB file to a VB file lower

Postby samb01 » Thu Dec 20, 2018 7:12 pm

Hello,

i have a vb file in a tape with this lenght :

VB 5004

I'd like to convert it with a VB file with 2400. But i'm not sure taht all the lines is higher tha 2400

so i used the following JCL (but this one works only if all the line are higher or equal to 2400)



//SYSIN  DD    *                                          
 SORT FIELDS=COPY                                          
 OUTFIL FNAMES=OUT1,                                      
 BUILD=(1,4,5:5,2396)
 


Is there a solution to get it even if the recors are lower than 2400 ?
samb01
 
Posts: 309
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert a VB file to a VB file lower

 

Re: convert a VB file to a VB file lower

Postby expat » Thu Dec 20, 2018 7:14 pm

Why would you want to do that
What benefit do you THINK there will be
... especially offset against any effort that you, and of course us, put in.

A VB record will be as long as it is, it will always be the same whatever LRECL you specify. I always have LRECL as 27994 for VB files.

I cannot see any valid reason for doing this. You will gain absolutely NOTHING
expat
 
Posts: 439
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 6 times

Re: convert a VB file to a VB file lower

Postby willy jensen » Thu Dec 20, 2018 8:42 pm

well, you can run an ICETOOL job like the following to determine the biggest record.
//GO    EXEC PGM=ICETOOL                    
//TOOLMSG  DD SYSOUT=*                      
//DFSMSG   DD SYSOUT=*                      
//DD1      DD DISP=SHR,DSN=vb.dataset.name      
//TOOLIN   DD *  
 STATS FROM(DD1) ON(VLEN)                  

But I must agree with expat, it doesnt make sense to me either.Perhaps you could explain why?
willy jensen
 
Posts: 203
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 31 times

Re: convert a VB file to a VB file lower

Postby samb01 » Thu Dec 20, 2018 8:51 pm

Hello, i agree with you, but it's an other socity wiche want this format VB 2400.
I don't know why they want this size, but must give then the file with this format.
And it's a huge file wich is in 32 tapes !!! et we must copy it in dasd volume with VB format and a length 2400.
samb01
 
Posts: 309
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert a VB file to a VB file lower

Postby steve-myers » Thu Dec 20, 2018 9:11 pm

For data sets containing variable length records, the DCB LRECL specifies the maximum record length of any record in the data set (not file). All you're doing with this ridiculous exercise is creating a new data set with a smaller declared LRECL and ABENDing if any record in the input data set has a record length greater than the smaller LRECL.

It costs nothing in terms of either real I/O time or CPU time to process a data set containing variable length records with a declared LRECL much greater than the maximum record length in the data set.

Many people seem to think LRECL for data sets containing variable length records specifies the record length for all the records in the data set. Not true! LRECL specifies the maximum record length. Some, or even all records can be smaller.
steve-myers
Global moderator
 
Posts: 1979
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 215 times

Re: convert a VB file to a VB file lower

Postby willy jensen » Thu Dec 20, 2018 9:25 pm

Well if you must copy to dasd then make sure that blksize is half-track. And I recommend max blksize on tape.
willy jensen
 
Posts: 203
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 31 times

Re: convert a VB file to a VB file lower

Postby willy jensen » Thu Dec 20, 2018 9:53 pm

Just realized I did not really answer your original question. For just copying, the simplest is probably IEBGENER:
//G1       EXEC PGM=IEBGENER                          
//SYSPRINT DD SYSOUT=*                                
//SYSIN    DD DUMMY                                  
//SYSUT1   DD DISP=SHR,DSN=wide.input.dataset      
//SYSUT2   DD DISP=(,CATLG),DSN=trimmed.output.dataset,              
//            SPACE=(whatever),RECFM=VB,LRECL=2048,  
//            BLKSIZE=0,DSORG=PS,UNIT=whatever  

This will terminate if ay record is wider than 2048 incl RDW. I assume that your intent is not to drop data outside the lrecl?
willy jensen
 
Posts: 203
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 31 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post