Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Alternative method for Datasort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Alternative method for Datasort
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

Senior Member


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

PostPosted: Tue Oct 19, 2010 9:20 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help with Oracle Dynamic SQL: Me... Anoop Chandran1984 COBOL Programming 1 Sat Feb 13, 2016 7:27 am
No new posts Use ISAM access method in COBOL Chetan Kumar COBOL Programming 18 Tue Oct 13, 2015 10:28 pm
No new posts Best Method/Utility to modify HEX val... MrExtraordinare JCL & VSAM 6 Mon Mar 09, 2015 10:09 pm
No new posts Alternative to CALL tso command jerryte TSO/ISPF 6 Fri Aug 29, 2014 12:06 am
No new posts AMODE 64 C system() alternative Eric Olson All Other Mainframe Topics 2 Tue May 21, 2013 8:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us