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

How to use SORT when SORTIN is DUMMY


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MSTP

New User


Joined: 21 Jun 2007
Posts: 30
Location: Baltimore

PostPosted: Wed Jul 23, 2014 9:29 am
Reply with quote

My SORTIN is DUMMY and I want to create a SORTOUT file with current system date. My SORTOUT is empty .Please look into SYSOUT attached and advise.


Thanks
MSTP
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Wed Jul 23, 2014 12:25 pm
Reply with quote

It's usually not a good idea to use attachments. Many of us cannot or will not download them. Try placing the output into a code group using code tags, like this -
Code:
These
     messages
             are
                embedded
                        in
                          code
                              tags
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 23, 2014 12:50 pm
Reply with quote

If you have DUMMY, there is no data to process. The only way to get the step to do anything is to use OUTFIL reporting functions, HEADER1 or TRAILER1. You'll probably want REMOVECC as well.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Jul 23, 2014 1:21 pm
Reply with quote

I can't even see the attachment, but I tried anyway.

First test:
Code:
//STEP01   EXEC PGM=SYNCSORT                   
//SORTIN   DD   DUMMY                         
//SORTOUT  DD   SYSOUT=*                       
//SYSOUT   DD   SYSOUT=*                       
//SYSIN    DD   *                             
   SORT   FIELDS=COPY                         
   OUTFIL NODETAIL,TRAILER1=(' DATE IS ',&DATE)
just gave me a rc of 16:
Code:
WER189A  SORTIN   DCB RECFM REQUIRED                   
WER108I  SORTIN   : RECFM=     ; LRECL=      ; BLKSIZE=
WER073I  SORTIN   : DSNAME=NULLFILE                     

So I tried again with:
Code:
//STEP01   EXEC PGM=SYNCSORT                   
//SORTIN   DD   DUMMY,DCB=(RECFM=F,LRECL=80)   
//SORTOUT  DD   SYSOUT=*                       
//SYSPRINT DD   SYSOUT=*                       
//SYSOUT   DD   SYSOUT=*                       
//SYSIN    DD   *                             
   SORT   FIELDS=COPY                         
   OUTFIL NODETAIL,TRAILER1=(' DATE IS ',&DATE)
and this time I got my SORTOUT:
Code:
 DATE IS 07/23/14
Back to top
View user's profile Send private message
MSTP

New User


Joined: 21 Jun 2007
Posts: 30
Location: Baltimore

PostPosted: Wed Jul 23, 2014 10:01 pm
Reply with quote

Thank you Bill and Marso for guiding me as your suggestion worked for me.I will try to post the code next time instead of attachments.

thanks
MSTP
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top