Convert fixed-length input records to variable-length output



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

Convert fixed-length input records to variable-length output

Postby xcspg3 » Wed Oct 23, 2024 1:45 pm

Hi, I can't find the reason why the output records are not written correctly and yet it all seems very simple to me

SORTIN => Record format . . . : VB Record length . . . : 1025
SORTOUT => Record format . . . : FB Record length . . . : 12

Input record

=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000001 021000001351791m   430352 <2424 %000000 ð004518 æ0565951  SRL    0 §DUBB
       FFFFFFFFFFFFFFF9103FFFFFF04FFFF06FFFFFF08FFFFFF09FFFFFFF00EDD4401F07CECC
       0210000013517914C0C4303520C24240C0000000C0045180C05659511C293001C01C4422
------------------------------------------------------------------------------
000002 021000002310513kð  600000 <2278 %000000 ð001784 æNO-PREV  CO     0 §BUSS
       FFFFFFFFFFFFFFF9803FFFFFF04FFFF06FFFFFF08FFFFFF09DD6DDCE00CD44401F07CEEE
       0210000023105132C0C6000000C22780C0000000C0017840C56079551C360001C01C2422
 


Output record

=COLS> ----+----1--                                                            
****** ***************************** Top of Data ******************************
351791 000001351791                                                            
       FFFFFFFFFFFF                                                            
       000001351791                                                            
------------------------------------------------------------------------------
310513 000002310513                                                            
       FFFFFFFFFFFF                                                            
       000002310513                                                            


Jcl

//S10      EXEC PGM=ICEMAN                
//SYSOUT   DD SYSOUT=*                    
//SORTIN   DD DISP=SHR,DSN=...    
//SORTOUT  DD DSN=...,            
//            DISP=(NEW,CATLG,DELETE),    
//            SPACE=(TRK,(1,1,),RLSE,,),  
//            RECFM=FB,LRECL=12            
//SYSIN    DD *                            
 SORT FIELDS=COPY                          
 INCLUDE COND=(05,03,CH,EQ,C'021')        
 OUTFIL OUTREC=(08,12),CONVERT            
//*                                        
 


Can someone help me?
Thanks
xcspg3
 
Posts: 32
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Convert fixed-length input records to variable-length ou

Postby xcspg3 » Wed Oct 23, 2024 2:33 pm

Sorry, the correct title is "Convert fixed-length input records from variable-length output", "from" and not "to"
xcspg3
 
Posts: 32
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Convert fixed-length input records to variable-length ou

Postby sergeyken » Wed Oct 23, 2024 5:48 pm

Please, present here THE FULL LOG OF MESSAGES produced by SORT.

I believe, you get exactly what is defined by your statements. What is wrong?
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Convert fixed-length input records to variable-length ou

Postby sergeyken » Wed Oct 23, 2024 5:59 pm

SORT considered every V-format record including its RDW (starting from position 1).
ISPF and almost all other tools do consider V-format records only as their data-part. The position 1 for ISPF is equivalent to position 5 for SORT.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Convert fixed-length input records to variable-length ou

Postby xcspg3 » Thu Oct 24, 2024 2:04 pm

Hi, maybe the reason is the input data set, after I changed it in edit the problem disappeared. If you look at the sortout you will be able to see the line number is not the progressive 1,2,... but it is wrong and this then creates problems in subsequent processing. Fixed issue with new input allocation.
xcspg3
 
Posts: 32
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Convert fixed-length input records to variable-length ou

Postby sergeyken » Wed Oct 30, 2024 1:09 pm

My impression is: you do not read the answers.

If so, there is no reason to ask questions.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post