Page 1 of 2

Can we use SORTIN DD as Dummy?

Posted: Sun Feb 16, 2014 2:20 am
by BobThomas
Hi,

I am using DFSORT to create file with system date and time. I have coded OUTREC parameters to do this but SORT gives an error with SORTIN as DUMMY. I don't want to use any input file so what can I do or in other words, is there a way out to achieve this without using any real SORTIN file?

Re: Can we use SORTIN DD as Dummy?

Posted: Sun Feb 16, 2014 5:54 am
by William Collins
//SORTIN DD * with no data following it will give you want you want.

When you say you've coded OUTREC, do you mean OUTREC or OUTFIL OUTREC?

Either way, with no input data, neither OUTREC would have anything to process.

You will need to use OUTFIL reporting features, HEADER1 or TRAILER1, and to remove the printer control codes from the output.

Re: Can we use SORTIN DD as Dummy?

Posted: Sun Feb 16, 2014 8:56 pm
by BobThomas
Thanks William.

Actually I want to avoid in-stream data. I'm using OUTFIL OUTREC.

Re: Can we use SORTIN DD as Dummy?

Posted: Wed Feb 26, 2014 11:03 pm
by dick scherrer
Is this now working?

Re: Can we use SORTIN DD as Dummy?

Posted: Fri Feb 28, 2014 7:50 pm
by BobThomas
Yes, it's working now - I had to use DCB on DUMMY.

Re: Can we use SORTIN DD as Dummy?

Posted: Sat Mar 01, 2014 1:57 am
by dick scherrer
Good to hear it is working - thank you for the follow up :)

d

Re: Can we use SORTIN DD as Dummy?

Posted: Sat Mar 01, 2014 5:07 am
by William Collins
Can you post your code? I'm curious as to how you got it to work.

Re: Can we use SORTIN DD as Dummy?

Posted: Sat Mar 01, 2014 7:44 am
by zprogrammer
Also please post the complete sysout messages within code tags

Re: Can we use SORTIN DD as Dummy?

Posted: Sat Mar 01, 2014 5:23 pm
by BobThomas
William - I got it working with following two ways. I'm making use of first method:

Code: Select all

//S1    EXEC  PGM=ICEMAN 
//SYSOUT    DD  SYSOUT=* 
//SORTIN DD DUMMY,RECFM=FB,LRECL=n,BLKSIZE=n 
//SORTOUT DD DSN=...  output file 
//SYSIN    DD    * 
  OPTION COPY 
  OUTFIL REMOVECC,NODETAIL,HEADER1=(date) 
/* 
I had not used RECFM=FB,LRECL=n,BLKSIZE=n and was thinking that DUMMY won't require it.

Code: Select all

//S2    EXEC  PGM=ICEMAN 
//SYSOUT    DD  SYSOUT=* 
//SORTIN DD * 
DUMMY 
/* 
//SORTOUT DD DSN=...  output file 
//SYSIN    DD    * 
  OPTION COPY 
  OUTREC FIELDS=(date) 
/* 

Re: Can we use SORTIN DD as Dummy?

Posted: Sat Mar 01, 2014 6:31 pm
by zprogrammer
Bob,

For many of us here

SORTIN as DUMMY mean

Code: Select all

SORTIN DD DUMMY
All you need is just a blank record

Re: Can we use SORTIN DD as Dummy?

Posted: Mon Mar 03, 2014 7:30 pm
by BobThomas
I'm sorry but I don't think that I follow you. I've used DD DUMMY as shown in my first job. Second job is other example which worked for me.

Re: Can we use SORTIN DD as Dummy?

Posted: Mon Mar 03, 2014 8:31 pm
by zprogrammer
Hi Bob,

When ever you are using SORTIN as DUMMY you need to use LRECL and RECFM

Code: Select all

//STEP01  EXEC PGM=SORT
//SORTIN   DD   DUMMY,RECFM=FB,LRECL=80
//SORTOUT  DD   SYSOUT=*
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
    OPTION COPY
    OUTFIL REMOVECC,NODETAIL,HEADER1=(DATE)
so this should work for you as well

Re: Can we use SORTIN DD as Dummy?

Posted: Mon Mar 03, 2014 8:44 pm
by BobThomas
:? - are you single threaded Pandora? This is what I show that I've used!

Re: Can we use SORTIN DD as Dummy?

Posted: Mon Mar 03, 2014 9:17 pm
by zprogrammer
Bob,

I was trying to emphasize DD DUMMY needs RECFM and LRECL after testing it

Re: Can we use SORTIN DD as Dummy?

Posted: Mon Mar 03, 2014 11:25 pm
by dick scherrer
are you single threaded Pandora?
I suppose you believed this was appropriate . . . :|

IMHO, it was not.

Please keep in mind that the people here are trying to help you.

Re: Can we use SORTIN DD as Dummy?

Posted: Tue Mar 04, 2014 2:06 am
by Anuj Dhawan
Hi Dick,

I did not mean to be rude though I was confused with the reply from PB. All is well here.

Re: Can we use SORTIN DD as Dummy?

Posted: Tue Mar 04, 2014 2:08 am
by Anuj Dhawan
Hi Dick,

I did not mean to be rude though I was confused with the replies from PB.

All is well here and hope there too. :)

Re: Can we use SORTIN DD as Dummy?

Posted: Tue Mar 04, 2014 2:09 am
by dick scherrer
Hi Anuj,

If you're good, i'm good ;)

I just didn't want to have this get out of hand . . .

d

Re: Can we use SORTIN DD as Dummy?

Posted: Tue Mar 04, 2014 2:13 am
by Anuj Dhawan
Hi Dick,

An edit went wrong -- sorry that was a reply from Bob... :oops:
BobThomas wrote:Hi Dick,

I did not mean to be rude though I was confused with the reply from PB. All is well here.

Re: Can we use SORTIN DD as Dummy?

Posted: Tue Mar 04, 2014 11:21 am
by BobThomas
Hi Dick,

I did not mean to be inappropriate, but it was confusing to follow PB.

All is well here and hope there too. :)