IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SORT CARD meaning please


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
justjpr

New User


Joined: 03 Nov 2022
Posts: 33
Location: INDIA

PostPosted: Wed Sep 25, 2024 12:27 am
Reply with quote

Code:

//SYSIN    DD *                                           
  SORT FIELDS=COPY                                       
  OUTFIL OUTREC=(1,4,5:(01,2,BI,ADD,+4),BI,LENGTH=2,2Z,1)
  END                                                     
/*                                                                                                           


What is the meaning of this SORT card?
input file attributes: SEQ,VB, LRECL 3704.
output file attributes: SEQ,VB, LRECL 3720.

I tested with 5 records in SORTIN and SYOUT=* as SORTOUT. the following error occurs. But it executes successfully in production with millions of records.


Code:

********************************* TOP OF DATA **********************************
ICE201I C RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICE805I 1 JOBNAME: TESTJOB1 , STEPNAME: STEP0020                               
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 V2R5  - 14:39 ON TUE SE
            SORT FIELDS=COPY                                                   
            OUTFIL OUTREC=(1,4,5:(01,2,BI,ADD,+4),BI,LENGTH=2,2Z,1)             
            END                                                                 
ICE126A 9 INCONSISTENT REFORMATTING FOR SORTOUT : REASON CODE 02, IFTHEN 0     
ICE751I 0 C5-I79519 C6-NONE   C7-I76950 C8-I76518 E9-I96983 E7-I76950           
ICE052I 3 END OF DFSORT                                                         
******************************** BOTTOM OF DATA ********************************                                                 
Back to top
View user's profile Send private message
justjpr

New User


Joined: 03 Nov 2022
Posts: 33
Location: INDIA

PostPosted: Wed Sep 25, 2024 1:07 am
Reply with quote

I created the i/p and o/p files with correct attributes. It runs successfully. The input data is right shifted by 8 positions and written in the output file. The first eight positions are filled with low values; but, they are not equal. I know that filling logic is in the SORT card, but I don't understand it. Please expain.
i/p:
Code:

----+----1----+----2----+----3----+----4----+----5
***************************** Top of Data ********
12345678901234567890                             
ABCDEFGHIJ1234567890ABCDEFGHIJ1234567890         
**************************** Bottom of Data ******

o/p:
Code:


Thanks.
----+----1----+----2----+----3----+----4----+----5
***************************** Top of Data ********
        12345678901234567890                     
        ABCDEFGHIJ1234567890ABCDEFGHIJ1234567890 
**************************** Bottom of Data ******

o/p with hex on:
Code:

----+----1----+----2----+----3----+----4----+----5
***************************** Top of Data ********
        12345678901234567890                     
01000100FFFFFFFFFFFFFFFFFFFF4444444444444444444444
0C000800123456789012345678900000000000000000000000
--------------------------------------------------
        ABCDEFGHIJ1234567890ABCDEFGHIJ1234567890 
03000200CCCCCCCCCDFFFFFFFFFFCCCCCCCCCDFFFFFFFFFF44
00000C00123456789112345678901234567891123456789000
--------------------------------------------------
**************************** Bottom of Data ******


Thanks.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Wed Sep 25, 2024 1:56 am
Reply with quote

Quote:
The RDW (Record Descriptor Word) at the front of each record is 4 bytes.

* The first two bytes are the length of the record.
* The second two bytes have 4 possible values:

00 -- record begins and ends in the current block
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2127
Location: USA

PostPosted: Wed Sep 25, 2024 4:51 pm
Reply with quote

justjpr wrote:

What is the meaning of this SORT card?
input file attributes: SEQ,VB, LRECL 3704.
output file attributes: SEQ,VB, LRECL 3720.
Code:
                             
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN                                               


Why not just to read any SORT manual???
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
No new posts GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
No new posts FB to .CSV conversion using sort DFSORT/ICETOOL 7
Search our Forums:

Back to Top