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
 

 

How to create file using Sort without using Input file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Shaheen Kalokhe

New User


Joined: 21 Feb 2008
Posts: 21
Location: India

PostPosted: Wed Oct 28, 2009 7:59 pm    Post subject: How to create file using Sort without using Input file?
Reply with quote

I want to create an Output file with the following requirements

1) FB with length of 400
2) It will have 4 records (Header + 3 Records )


The output file should have the following contents.

0008888880000000000000000
0003678421280000003
0004335271280000003
0007325621280000003


Please let me know how can this be achieved using DFSORT/ICETOOL without using an Input File.


Thanks
Shaheen
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Oct 28, 2009 8:52 pm    Post subject: Reply to: How to create file using Sort without using Input
Reply with quote

Shaheen Kalokhe,

The following DFSORT JCL will give you the desired results
Code:

//STEP0100 EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                             
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                             
  SORT FIELDS=COPY                         
  OUTFIL REMOVECC,NODETAIL,BUILD=(400X),   
  TRAILER1=('0008888880000000000000000',/, 
            '0003678421280000003',/,       
            '0004335271280000003',/,       
            '0007325621280000003')         
//*
Back to top
View user's profile Send private message
Shaheen Kalokhe

New User


Joined: 21 Feb 2008
Posts: 21
Location: India

PostPosted: Fri Oct 30, 2009 8:03 pm    Post subject:
Reply with quote

Skolusu,

Thanks a ton for your reply. The Sort worked fine. I went through the manuals to understand the use of REMOVECC & NODETAIL. I understood the use of REMOVECC but could not understand the use of NODETAIL.

Please explain a bit about NODETAIL.


Thanks & Regards
Shaheen
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1504
Location: Chennai

PostPosted: Fri Oct 30, 2009 8:38 pm    Post subject:
Reply with quote

Hi,

NODETAIL option will supress the input records from being copied to o/p file.
Only the trailer statement o/p will be in the o/p file.

NODETAIL eliminates the data records.

Thanks & Regards,
Back to top
View user's profile Send private message
Shaheen Kalokhe

New User


Joined: 21 Feb 2008
Posts: 21
Location: India

PostPosted: Mon Nov 02, 2009 12:00 pm    Post subject:
Reply with quote

Thank you

vasanthz
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am


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