Page 2 of 2

Re: Copying the VB file to VB file

PostPosted: Wed Sep 18, 2019 4:11 pm
by NicC
Sorry, no. I thought I had done it but just checked the Application Programming manual and Smart Tricks manual and you have to PARSED into fixed length fields and then SQZ when constructing your output fields.

As we seem to have settled on DFSort I have moved this from Easytieve to DFSort.

Re: Copying the VB file to VB file

PostPosted: Wed Sep 18, 2019 6:06 pm
by sergeyken
Dhanu0009 wrote:@ sergeyken, Can you please help to elaborate the SORT ccard w.r.to one field with SQZ and VLTRIM

 OUTFIL FTOV,                                                    
       BUILD=(1,6,SQZ=(SHIFT=LEFT)),VLTRIM=C' '                  
 

You would need to squeeze the whole length of your fixed record produced by concatenation of %nn fields, but NOT only first 6 bytes of it

 OUTFIL FTOV,                                                    
       BUILD=(1,whole_length_of_record,SQZ=(SHIFT=LEFT)),VLTRIM=C' '                  
 

Re: Copying the VB file to VB file

PostPosted: Wed Sep 18, 2019 10:38 pm
by sergeyken
My fault: actually parameter SQZ=(VL) must be used. Sorry for that

OUTFIL FTOV,                                                    
       BUILD=(1,record_length,SQZ=(VL))

Re: Copying the VB file to VB file

PostPosted: Fri Sep 20, 2019 10:05 am
by Dhanu0009
Can anyone help me for the same??

Re: Copying the VB file to VB file

PostPosted: Fri Sep 20, 2019 2:41 pm
by NicC
You have been given the solution. If it does not meet your requirments, as specified by you, then how does it not meet your requirements?

Re: Copying the VB file to VB file

PostPosted: Mon Sep 23, 2019 10:48 am
by Dhanu0009
Got the solution with two sort cards rather than single sort card.
1st Sort:
OPTION COPY                                              
INREC FINDREP=(INOUT=(C'|',C'"|"'))                      
OUTREC PARSE=(%01=(ENDBEFR=C'"|',FIXLEN=08),            
              %02=(ENDBEFR=C'|',PAIR=QUOTE,FIXLEN=08),  
              %03=(ENDBEFR=C'|',PAIR=QUOTE,FIXLEN=12),  
              %04=(ENDBEFR=C'|',PAIR=QUOTE,FIXLEN=36),  
              %05=(ENDBEFR=C'|',PAIR=QUOTE,FIXLEN=10),  
              %06=(ENDBEFR=C'|',PAIR=QUOTE,FIXLEN=10),  
              %07=(ENDBEFR=C'|',PAIR=QUOTE,FIXLEN=08),  
              %08=(ENDBEFR=C'|',PAIR=QUOTE,FIXLEN=06),  
             .
             .
           %96=(ENDBEFR=C'|',PAIR=QUOTE,FIXLEN=15)),              
BUILD=(1,4,%01,C'|',%02,C'|',%03,C'|',%04,C'|',%05,C'|',%06,C'|',  
           %07,C'|',%08,C'|',%09,C'|',%10,C'|',%11,C'|',%12,C'|',  
           %13,C'|',%14,C'|',%15,C'|',%16,C'|',%17,C'|',%18,C'|',  
           %19,C'|',%20,C'|',%21,C'|',%22,C'|',%23,C'|',%24,C'|',  
          ………..,%96,C'|')  


2nd Sort:

OPTION COPY                                                    
INREC BUILD=(1,4,5,4846,SQZ=(SHIFT=LEFT,PAIR=QUOTE))          
OUTREC FINDREP=(INOUT=(C'"|"',C'|',C'|"',C'|',C'"|',C'|'))    
OUTFIL BUILD=(1,4,5,4576),VLTRIM=C' '                          


Thanks all for the responses.
Code tags added - please learn how to do this for yourself