MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Taking SYSOUT into Fixed Block PS file from a SORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
mangsk
Beginner


Joined: 05 Jun 2004
Posts: 46
Topics: 18

PostPosted: Mon Nov 14, 2011 3:02 pm    Post subject: Taking SYSOUT into Fixed Block PS file from a SORT Reply with quote

I am having a simple SORT step. I wish to create a FB file from SYSOUT.
Code:

//STEPXX    EXEC PGM=SORT,                   
//SYSOUT   DD DSN=XXXX.SYSOUT,                         
//            SPACE=(TRK,(5,5)),                                     
//            DCB=(BLKSIZE=0,RECFM=FB,LRECL=133),                   
//            DISP=(NEW,CATLG,DELETE)                               
//*                                                                 
//SORTJNF1 DD DISP=SHR,DSN=XXXX.file1
//*                                                                 
//SORTJNF2 DD DISP=SHR,DSN=XXXX.file2             
//*                                                                 
//SORTOF01 DD   DUMMY                                               
//SORTOF02 DD   DUMMY                                               
//SORTOF99 DD   DUMMY                                               
//*                                                                 
//SYSIN    DD  *                                                     
   JOINKEYS FILES=F1,FIELDS=(52,03,A)                               
   JOINKEYS FILES=F2,FIELDS=(1,03,A)                                 
   REFORMAT FIELDS=(F1:1,213,F2:4,3)                                 
   SORT FIELDS=(1,213,CH,A)                                         
   JOIN UNPAIRED,F1                                                     
   OUTFIL FILES=01,                                 
        INCLUDE=(214,03,CH,EQ,C'00X')                           
   OUTFIL FILES=02,                                 
        INCLUDE=(214,03,CH,EQ,C'00Y')           

After I execute it, the SYSOUT dataset gets created with VBA and LRECL=125. I tried giving a dataset of FB, 133 and using it with DISP=SHR; but that also gets converted to VBA,125.
Is there a way of doing this in the same step? Or do I need to write another step with OUTREC or OUTFIL to convert it to FBA ?
_________________
Regards,
Mangsk
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Mon Nov 14, 2011 3:11 pm    Post subject: Reply with quote

Which sort product is being used on your system? Posting the informational output from any execution will show which product.

What do you want to do with the "sysout" dataset (i.e how is it to be used)?
_________________
All the best,

di
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Nov 14, 2011 3:27 pm    Post subject: Reply with quote

mangsk,

I am guessing that you are using syncsort as DFSORT uses RECFM=FBA, LRECL=121 for Sysout and the specified BLKSIZE for the message data set. If the BLKSIZE you specify is not a multiple of 121, DFSORT uses BLKSIZE=121.

Read here more about //SYSOUT DD
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mangsk
Beginner


Joined: 05 Jun 2004
Posts: 46
Topics: 18

PostPosted: Mon Nov 14, 2011 3:28 pm    Post subject: Reply with quote

papadi,
Thanks for the quick response.
Our shop has Syncsort 1.3.2.1R.
With the SYSOUT dataset, I need to extract the counts (SORTOF*) and sum them to validate if they are equal to the number in front of 'RCD IN'.
_________________
Regards,
Mangsk
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Mon Nov 14, 2011 3:40 pm    Post subject: Reply with quote

Hello,

You can read the file as it is. . . If you encounter something unexpected, post what you tried and what happened.

I have yet to see a sort the "lost" or "spontaneously generated" records. Why would someone believe this is something that should even be addressed? I believe your time would be far better spent on something worth doing.
_________________
All the best,

di
Back to top
View user's profile Send private message
mangsk
Beginner


Joined: 05 Jun 2004
Posts: 46
Topics: 18

PostPosted: Mon Nov 14, 2011 4:17 pm    Post subject: Reply with quote

papadi,

I Agree But this is specific client requirement Sad
When I use the VB 125 file and try INREC or INCLUDE COND statement on that, e.g.
INCLUDE COND=(57,17,CH,EQ,C'TOTAL RECORDS OUT')
I get the following error message -
WER250A INCLUDE/OMIT FIELD BEYOND RECORD

When I use the FB and FBA file with the same content, then it works fine.
_________________
Regards,
Mangsk
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Mon Nov 14, 2011 11:01 pm    Post subject: Reply with quote

Suggest you read about handling "short records" in the documentation. It is not on the machine where i am tonight.
_________________
All the best,

di
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group