Page 1 of 1

Sort control card working for FB file but not for VB file

PostPosted: Thu Oct 20, 2016 11:42 am
by arya_starc
Hi All,

My below sort control card working fine for the FB files but for the VB file it throwing max cc 16.


   SORT FIELDS=COPY                                                      
  OUTFIL REMOVECC,BUILD=(1,60),                                        
 HEADER1('AML1-AMBS-ACCT',6X,'AML1-SIGNON-NAME',6X,'AML1-VL11-A-DTA-X')
 OUTREC FIELDS=(1:16,19,20:C'|',21:68,20,42:C'|',43:112,11,7X)                                             
 


Below is the error message I am getting

ICE201I 0 RECORD TYPE IS V - DATA STARTS IN POSITION 5                          
ICE805I 1 JOBNAME: AML1REPT , STEPNAME: STEP010                                
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                    
ICE143I 0 BLOCKSET     COPY  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  - 12:51 ON THU OC
           SORT FIELDS=COPY                                                    
            OUTFIL REMOVECC,BUILD=(1,60),                                      
           HEADER1('AML1-AMBS-ACCT',6X,'AML1-SIGNON-NAME',6X,'AML1-VL11-A-DTA-X'
           OUTREC FIELDS=(1:16,19,20:C'|',21:68,20,42:C'|',43:112,11,7X)        
ICE251A 0 MISSING RDW OR DATA FOR *OUTREC : REASON CODE 03, IFTHEN 0            
ICE751I 0 C5-I21470 C6-BASE   C7-K96411 C8-I25275 E9-BASE   E7-I22412          
ICE052I 3 END OF DFSORT                                                        
 

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 11:56 am
by enrico-sorichetti
when working with VB files You should remember that all the fields positions for the moves are 4 bytes off ( RDW )

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 12:42 pm
by arya_starc
I move the four bytes for all those fields which I giving as input in the outrec field.
But still it giving the same rc

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 12:43 pm
by Aki88
Hello,

In continuation to what Mr. Sorichetti has already stated, you should look at the diagnostic messages more closely, they are there for a purpose.

For example:
The first message that DFSORT populated for you: ICE201I gives you an immediate answer to your problem statement - since your dataset is of format - Variable, hence the data is starting from position '5'. Which would mean, that if you have a field starting at position '1', now it changes to '5' (an increase of 4 bytes for every field) and so on; this has already been discussed in an earlier post of yours. Since you didn't adhere to this rule you got an ICE251A, which is basically telling you to account for the 4 bytes of RDW.

arya_starc wrote:..... Below is the error message I am getting

ICE201I 0 RECORD TYPE IS V - DATA STARTS IN POSITION 5                          
....
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                    
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                
....
ICE251A 0 MISSING RDW OR DATA FOR *OUTREC : REASON CODE 03, IFTHEN 0            
... 


Refer the manuals, search the internet for the error messages if you don't know which manual to refer (as shown earlier), IBM has some really detailed and well-documented manuals; if you're just starting out, self-learning will take you a long way, instead of quick solutions.

Hope this helps.

Edit: The field starting at 16th byte changes to 20 and so on. Can you share the updated SORT card that is failing?

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 1:02 pm
by Aki88
Missed adding: If you are writing data to an FB dataset (which you very positively are), look at VTOF in DFSORT programming guide.

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 2:32 pm
by NicC
Note that nothing on the mainframe "throws" anything - nless it is an operator sitting on top of it who throws his sandwich wrapper into the waste bin. Software gives errors, fails, abends etc but not "throws".

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 7:28 pm
by arya_starc
Aki88 wrote:
Edit: The field starting at 16th byte changes to 20 and so on. Can you share the updated SORT card that is failing?


Hi Aki88,

I updated the sort control card but again got the same RC.

  SORT FIELDS=(5,6,ZD,A)                                                
   OUTFIL REMOVECC,BUILD=(1,60),                                        
  HEADER1('AML1-AMBS-ACCT',6X,'AML1-SIGNON-NAME',6X,'AML1-VL11-A-DTA-X')
  OUTREC FIELDS=(1:20,19,20:C'|',21:72,20,42:C'|',43:116,11,7X)          
 


previously using SORT FIELDS=(1,6,ZD,A).. now changes to SORT FIELDS=(5,6,ZD,A)
and so on in outrec fields.

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 7:30 pm
by arya_starc
NicC wrote:Note that nothing on the mainframe "throws" anything - nless it is an operator sitting on top of it who throws his sandwich wrapper into the waste bin. Software gives errors, fails, abends etc but not "throws".


Yes Nicc..!!!
i keep on note of that in next posts.

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 7:58 pm
by Aki88
You missed my last note:

Aki88 wrote:Missed adding: If you are writing data to an FB dataset (which you very positively are), look at VTOF in DFSORT programming guide.


Why do you need OUTREC when you are already using OUTFIL; use the functionality of BUILD to build your records. Add a VTOF to OUTFIL statement else your output dataset will be VB in format and you WILL have to account for the 4 bytes of RDW.

Re: Sort control card working for FB file but not for VB fil

PostPosted: Thu Oct 20, 2016 8:23 pm
by Aki88
<Missed EDIT time, hence a new post; Moderators request you to merge this post to the last one>

Here is a tweaked, tested SORT card.
Aside, you might want to add additional filters though as the data might not look satisfactory depending on what you're trying to extract:


//MONKYBIZ EXEC PGM=SORT                                
//SYSOUT   DD SYSOUT=*                                  
//SORTIN   DD DISP=SHR,DSN=<The VB/16100 LRECL input DS- correct me if I have the LRECL wrong>
//SORTOUT  DD DSN=TEST.XXX.LOOFA,                  
//            DISP=(NEW,CATLG,DELETE),                  
//            SPACE=(CYL,(5,5),RLSE)                    
//SYSIN    DD *                                        
 SORT FIELDS=(5,6,ZD,A)                                
   OUTFIL REMOVECC,VTOF,                                
 HEADER1('AML1-AMBS-ACCT',6X,'AML1-SIGNON-NAME',6X,    
        'AML1-VL11-A-DTA-X'),                          
   BUILD=(1:20,19,20:C'|',21:72,20,42:C'|',43:116,11,7X)
/*