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

OUTREC in JCL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandhyaimmadi

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Fri Jul 23, 2010 1:48 pm
Reply with quote

I want to write a field if it greater than spaces into a file using OUTREC.

Please suggest.

Field is from 6(start pos) and is of 8 bytes and is character format.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 23, 2010 1:56 pm
Reply with quote

I believe that you really do need to give just a whole lot more detail than you have.

Which sort product and release level are you using.
DSORG, RECFM and LRECL of both input and output files.
Exactly what do you want to write out, just that field or the whole record, or subsets of that record.
Back to top
View user's profile Send private message
sandhyaimmadi

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Fri Jul 23, 2010 2:08 pm
Reply with quote

I am using DFSORT.
DSORG is PS,RECFM=FM , LRECL=400 is for both inp and output files
I just want to write only that field to output file.
Back to top
View user's profile Send private message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Fri Jul 23, 2010 5:31 pm
Reply with quote

its still unclear wat you want. Do u mean to bypass records that have spaces in position 6 to 13

in that case sort card should be

Code:

   OPTION COPY
   INCLUDE COND=(6,8,CH,NE,C' ')
   OUTREC BUILD=(6,8)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jul 23, 2010 9:55 pm
Reply with quote

Quote:
I want to write a field if it greater than spaces into a file using OUTREC.


If that's what you really want to do, then you could use a DFSORT job like this:

Code:

//S1 EXEC PGM=SORT                                   
//SYSOUT DD SYSOUT=*                                 
//SORTIN DD *                                         
R1   ABCDEFGH                                         
R2                                                   
R3          A                                         
R4      B                                             
R5                                                   
//SORTOUT DD SYSOUT=*                                 
//SYSIN DD *                                         
  OPTION COPY                                         
  INCLUDE COND=(6,8,CH,GT,C' ')                       
  OUTREC BUILD=(6,8)                                   
/*


SORTOUT would have these records:

Code:

ABCDEFGH 
       A 
   B     


If that's not what you want, then you need to do a better job of explaining what you do want. Show an example of your input records and expected output records.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
No new posts Getting OUTREC - SHORT REC error for ... DFSORT/ICETOOL 12
No new posts Issues with outrec overlay while extr... SYNCSORT 7
No new posts SEQNUM with TRA=ETOA in OUTREC SYNCSORT 5
Search our Forums:

Back to Top