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 

OUTFIL

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


Joined: 11 Apr 2005
Posts: 42
Topics: 19
Location: India

PostPosted: Tue May 17, 2005 3:16 pm    Post subject: OUTFIL Reply with quote

Hi,

I am trying to write a simple SORT card which does the following two things:
1. Copies the contents of SORTIN to SORTOF1.
2. Writes C'01' in the SORTOF2.

Please advise on how should I achieve this?.
Thanks,
Back to top
View user's profile Send private message
Siddheart22
Beginner


Joined: 11 Apr 2005
Posts: 42
Topics: 19
Location: India

PostPosted: Tue May 17, 2005 3:20 pm    Post subject: Reply with quote

I forgot to mention :
LRECL for SORTOF1 is same as SORTIN (i.e. 400 bytes)
LRECL for SORTOF2 is 2 bytes.

Thanks,
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: Tue May 17, 2005 3:21 pm    Post subject: Reply with quote

Siddheart22,

Try this job


Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=YOUR INPUT FILE,
//            DISP=SHR
//SORTOF01 DD DSN=YOUR FIRST OUTFIL FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SORTOF02 DD DSN=YOUR SECOND OUTFIL FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *
  SORT FIELDS=COPY
  OUTFIL FILES=01
  OUTFIL FILES=02,OUTREC=(C'02')
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Siddheart22
Beginner


Joined: 11 Apr 2005
Posts: 42
Topics: 19
Location: India

PostPosted: Tue May 17, 2005 3:27 pm    Post subject: OUTFIL Reply with quote

Actually was trying this only and was getting the following abend message.

SYSIN :
SORT FIELDS=COPY
OUTFIL FILES=1
OUTFIL FILES=2,OUTREC=(C'01')
WER164B 5,872K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 48K BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VB ; LRECL= 400; BLKSIZE= 27998
WER235A SORTOF2 OUTREC RDW NOT INCLUDED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************* BOTTOM OF DATA ********************************
Back to top
View user's profile Send private message
Siddheart22
Beginner


Joined: 11 Apr 2005
Posts: 42
Topics: 19
Location: India

PostPosted: Tue May 17, 2005 4:01 pm    Post subject: OUTFIL Reply with quote

Please assist in resolving this abend...

Thanks,
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: Tue May 17, 2005 4:37 pm    Post subject: Reply with quote

Siddheart22,

Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question. If you have supplied the right information you would have got an answer immediately.

Now another question. Do you want your SORTOF02 a varaible block file or a Fixed block file as your input file is a VB file.

If you need a variable block file, then use the following control cards.
Code:

//SYSIN    DD *                                   
  SORT FIELDS=COPY                                 
  OUTFIL FILES=01                                   
  OUTFIL FILES=02,OUTREC=(1,4,C'01')               
/*                                                 


If you need a fixed block file, then use the following control cards.

Code:

//SYSIN    DD *                                   
  SORT FIELDS=COPY                                 
  OUTFIL FILES=01                                   
  OUTFIL FILES=02,CONVERT,OUTREC=(C'01')           
/*                                                 


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Siddheart22
Beginner


Joined: 11 Apr 2005
Posts: 42
Topics: 19
Location: India

PostPosted: Tue May 17, 2005 4:46 pm    Post subject: OUTFIL Reply with quote

Hi,
Firstly, apologies for not being clear in the question.

Answer to your first question:
The second file is a fixed block and after analysing a little I realised that so changed the SORT card.
SORT FIELDS=COPY
OUTFIL FILES=1
OUTFIL FILES=2,VTOF,OUTREC=(C'01')

This helped me run the SORT successfully. And gave an output file of LRECL=2 bytes with all '01's

Now, the other question is:
Is it possible to have this second file (SORTOF2) in this SORT step with only ONE record containing '01'?

Actually, I am building a parm card through this SORT step which would be later read by my program.

Thanks,
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: Tue May 17, 2005 4:59 pm    Post subject: Reply with quote

Quote:

Now, the other question is:
Is it possible to have this second file (SORTOF2) in this SORT step with only ONE record containing '01'?


Sure , change the control card to the following.

Code:

//SYSIN    DD *                                   
  SORT FIELDS=COPY                                 
  OUTFIL FILES=01                                   
  OUTFIL FILES=02,CONVERT,ENDREC=1,
  OUTREC=(C'01')           
/*                         


or
Code:

//SYSIN    DD *                                   
  SORT FIELDS=COPY                                 
  OUTFIL FILES=01                                   
  OUTFIL FILES=02,VTOF,ENDREC=1,
  OUTREC=(C'01')           
/*                         


Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Siddheart22
Beginner


Joined: 11 Apr 2005
Posts: 42
Topics: 19
Location: India

PostPosted: Tue May 17, 2005 5:09 pm    Post subject: OUTFIL Reply with quote

Ohh ENDREC....
Should have thought of it...Smile
Thanks anyways...
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