Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8666
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 OUTREC OVERLAY different to INCREC ge... Joerg.Findeisen SYNCSORT 8 Fri Apr 27, 2018 2:11 am
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us