Copying the VB file to VB file



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

Re: Copying the VB file to VB file

Postby NicC » Wed Sep 18, 2019 4:11 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3004
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Re: Copying the VB file to VB file

 

Re: Copying the VB file to VB file

Postby sergeyken » Wed Sep 18, 2019 6:06 pm

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' '                  
 
sergeyken
 
Posts: 100
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 2 times
Been thanked: 10 times

Re: Copying the VB file to VB file

Postby sergeyken » Wed Sep 18, 2019 10:38 pm

My fault: actually parameter SQZ=(VL) must be used. Sorry for that

OUTFIL FTOV,                                                    
       BUILD=(1,record_length,SQZ=(VL))
sergeyken
 
Posts: 100
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 2 times
Been thanked: 10 times

Re: Copying the VB file to VB file

Postby Dhanu0009 » Fri Sep 20, 2019 10:05 am

Can anyone help me for the same??
Dhanu0009
 
Posts: 7
Joined: Tue Sep 17, 2019 6:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Copying the VB file to VB file

Postby NicC » Fri Sep 20, 2019 2:41 pm

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?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3004
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Copying the VB file to VB file

Postby Dhanu0009 » Mon Sep 23, 2019 10:48 am

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
Dhanu0009
 
Posts: 7
Joined: Tue Sep 17, 2019 6:20 pm
Has thanked: 0 time
Been thanked: 0 time

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post