can i use the different length for the sortin and sortout



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

can i use the different length for the sortin and sortout

Postby arya_starc » Mon Oct 03, 2016 3:46 pm

Hi All,

Can I pass the sortin and Sortout of different length.
example:-
consider this scenario

I having SORTIN is of length 35 but after sorting operation I get the output in length 37.
as I am using outfil and using TOT operation so the field length is increased, can anyone tell is it possible?
arya_starc
 
Posts: 60
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 3 times
Been thanked: 0 time

Re: can i use the different length for the sortin and sortout

 

Re: can i use the different length for the sortin and sortou

Postby enrico-sorichetti » Mon Oct 03, 2016 3:54 pm

can anyone tell is it possible?

a Yes/No question deserves a Yes/No answer

Yes - it is possible - how ... search the forum, gazillions of examples
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2519
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 120 times

Re: can i use the different length for the sortin and sortou

Postby arya_starc » Mon Oct 03, 2016 4:04 pm

enrico-sorichetti wrote:
can anyone tell is it possible?

a Yes/No question deserves a Yes/No answer

Yes - it is possible - how ... search the forum, gazillions of examples


I am using trailer in the sort control card
Below is my sort controlcard

  SORT FIELDS=(1,2,ZD,A)                                                
  OUTFIL REMOVECC,                                                      
  TRAILER1(1:1C'TOTAL',                                                
          11:TOT=(11,9,SFF,EDIT=(I,II,III,III),LENGTH=12),              
           24:TOT=(20,16,SFF,EDIT=(II,III,III,III,III),LENGTH=18))      
 


I got max cc 16 with below message as I given the input record length of 35 and I having the sortout file of length 41

ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1                          
ICE805I 1 JOBNAME: ZTHTSORT , STEPNAME: STEP010                                
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                    
ICE143I 0 BLOCKSET     SORT  TECHNIQUE SELECTED                                
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R1  - 17:31 ON MON OC
            SORT FIELDS=(1,2,ZD,A)                                              
            OUTFIL REMOVECC,                                                    
            TRAILER1(1:1C'TOTAL',                                              
                    11:TOT=(11,9,SFF,EDIT=(I,II,III,III),LENGTH=12),            
                     24:TOT=(20,16,SFF,EDIT=(II,III,III,III,III),LENGTH=18))    
ICE222A 0 35 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 41 BYTE LRECL FOR SORTOUT
ICE751I 0 C5-I21470 C6-BASE   C7-K96411 C8-I25275 E4-BASE   E7-I22412          
ICE052I 3 END OF DFSORT                                                        

 
arya_starc
 
Posts: 60
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 3 times
Been thanked: 0 time

Re: can i use the different length for the sortin and sortou

Postby Aki88 » Mon Oct 03, 2016 4:57 pm

Hello,

Quoting Mr. Boyo's reponse to your last post on this forum wherein you pointed out TRAILER1 worked without BUILD:

BillyBoyo wrote:That is because your records present to OUTFIL are at least 36 bytes long. If your OUTFIL records are shorter than the HEADERn/TRAILERn output, you get a run-time failure.


Now, this is where BUILD is actually helpful- it helps you Build your output in the desired format; Change your OUTFIL to below code, and see what happens:


OUTFIL REMOVECC,BUILD=(1,35,6X),
 


Note: There are other ways of doing this too, for example tweaking the data with INREC and so on.
Aki88
 
Posts: 286
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 31 times
Been thanked: 23 times

Re: can i use the different length for the sortin and sortou

Postby arya_starc » Tue Oct 04, 2016 1:06 am

Aki88 wrote:Hello,

Quoting Mr. Boyo's reponse to your last post on this forum wherein you pointed out TRAILER1 worked without BUILD:

BillyBoyo wrote:That is because your records present to OUTFIL are at least 36 bytes long. If your OUTFIL records are shorter than the HEADERn/TRAILERn output, you get a run-time failure.


Now, this is where BUILD is actually helpful- it helps you Build your output in the desired format; Change your OUTFIL to below code, and see what happens:


OUTFIL REMOVECC,BUILD=(1,35,6X),
 


Note: There are other ways of doing this too, for example tweaking the data with INREC and so on.

Thanks a lot..i start to read the DFSORT as i am deeply impressed by the various functions of DFSORT.
arya_starc
 
Posts: 60
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 3 times
Been thanked: 0 time

Re: can i use the different length for the sortin and sortou

Postby BillyBoyo » Tue Oct 04, 2016 10:42 am

Start with the Getting Started Guide.
BillyBoyo
Global moderator
 
Posts: 3759
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 256 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post