Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

OUTREC in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: OUTREC in JCL
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 23, 2010 1:56 pm    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Fri Jul 23, 2010 9:55 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am
No new posts OUTREC RDW NOT INCLUDED krsenthil85 SYNCSORT 10 Fri May 06, 2016 3:22 am
No new posts OUTREC on OUTFIL error rocky_balboa DFSORT/ICETOOL 4 Thu Aug 27, 2015 10:26 am
No new posts OUTREC with IFTHEN Query... mkk157 DFSORT/ICETOOL 1 Wed Aug 26, 2015 5:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us