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

Alternative method for Datasort


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

New User


Joined: 19 Aug 2010
Posts: 47
Location: Hyderabad

PostPosted: Tue Oct 19, 2010 4:10 pm
Reply with quote

Hi,

I have a requirement, to sort all records except header. In output file i want header as it is and remaining detail records needs to be in sorted order.

I used below jcl in test environment, it worked because of having new version of DFSORT. In other environment still not yet upgraded. we can see below msg, it indicates the old version where datasort doesn't work.

ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1

So when i am trying to run below job it is giving RC 12.

Code:
//SORT01   EXEC PGM=ICETOOL                                 
//TOOLMSG  DD  SYSOUT=*                                     
//DFSMSG   DD  SYSOUT=*                                     
//IN       DD  DSN=YYYYYY,DISP=SHR     
//OUT      DD  DSN=xxxx,...
//TOOLIN   DD *                                             
  COPY FROM(IN) TO(OUT)                                       
  DATASORT FROM(IN) TO(OUT) HEADER USING(CTL1)               
/*                                                           
//CTL1CNTL DD *                                             
  SORT FIELDS=(11,20,CH,A)                                   
/*


ToolMsg :-
ICE630I 0 MODE IN EFFECT: STOP

COPY FROM(IN) TO(OUT)
ICE627I 0 DFSORT CALL 0001 FOR COPY FROM IN TO OUT COMPLETED
ICE602I 0 OPERATION RETURN CODE: 00

DATASORT FROM(IN) TO(OUT) HEADER USING(CTL1)
$
ICE614A 0 INVALID OPERATOR
ICE602I 0 OPERATION RETURN CODE: 12

Could anyone please tell me any alternative for this using DFSORT in single step if possible, to achieve same result.

Thanks,
Ram.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Oct 19, 2010 9:20 pm
Reply with quote

You've not shown the input and expected output from that. Can header be identified by somehting, like 'HEDR' at first 4-positions.

By using a special key of '0' for the header record, '1' for the data records and '9' for the trailer records before the regular key, you can ensure that the header is first and details are after that and sorted.
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 Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Need help with Oracle Dynamic SQL: Me... COBOL Programming 1
No new posts Use ISAM access method in COBOL COBOL Programming 18
No new posts Best Method/Utility to modify HEX val... JCL & VSAM 6
No new posts Alternative to CALL tso command TSO/ISPF 6
Search our Forums:

Back to Top