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

Batch File-Aid making use of READNEXT


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Tue Feb 10, 2009 7:16 pm
Reply with quote

Hi,

I request you to post few batch File-Aid jobs that make use of READNEXT parameter. I read the programming guide but could not understand the exact usage of it because it does not have any examples !

Thanks.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Feb 13, 2009 7:51 am
Reply with quote

Hi,

an example of READNEXT
Code:
//* THE READNEXT PARAMETER ENABLES YOU TO CODE THE ACTION TO END       
//* PROCESSING OF THE CURRENT RECORD AND START THE FUNCTION OVER       
//* WITH THE NEXT RECORD.                                               
//*                                                                     
//FILEAID1 EXEC PGM=FILEAID                                             
//SYSPRINT DD SYSOUT=*                                                 
//DD01     DD *                                                         
12345S                                                                 
12345W                                                                 
12345R                                                                 
12345M                                                                 
//OUTS     DD SYSOUT=*                                                 
//OUTM     DD SYSOUT=*                                                 
//OUTO     DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
$$DD01 USER IF=(06,EQ,C'W'),READNEXT,                                   
 IF=(06,EQ,C'S'),WRITE=OUTS,READNEXT,                                   
 IF=(06,EQ,C'M'),WRITE=OUTM,                                           
 DFLT_WRITE=OUTO                                                       
/*


Gerry
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Sun Feb 15, 2009 6:22 pm
Reply with quote

Gerry, this example I found in the programming guide ! I would like to see more examples to have a clear understanding.

Please help. Thanks.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sun Feb 15, 2009 9:29 pm
Reply with quote

Ramsri,
First you said, "[the programming guide] does not have any examples", and now you say, "this example I found in the programming guide". Which is it?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Feb 16, 2009 3:19 am
Reply with quote

Hi,

see the 2 examples below and you should see the difference when you run them

Code:
//FILEAID1 EXEC PGM=FILEAID                                             
//SYSPRINT DD SYSOUT=*                                                 
//DD01     DD *                                                         
12345S                                                                 
12345M                                                                 
//OUTS     DD SYSOUT=*                                                 
//OUTM     DD SYSOUT=*                                                 
//OUTO     DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
$$DD01 USER IF=(06,EQ,C'S'),WRITE=OUTS,READNEXT,                       
            IF=(06,EQ,C'M'),                                           
          ORIF=(06,EQ,C'S'),WRITE=OUTM,                                 
 DFLT_WRITE=OUTO                                                       
/*                                                                     
//**********************************************************************


Code:
//FILEAID1 EXEC PGM=FILEAID                                             
//SYSPRINT DD SYSOUT=*                                                 
//DD01     DD *                                                         
12345S                                                                 
12345M                                                                 
//OUTS     DD SYSOUT=*                                                 
//OUTM     DD SYSOUT=*                                                 
//OUTO     DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
$$DD01 USER IF=(06,EQ,C'S'),WRITE=OUTS,                                 
            IF=(06,EQ,C'M'),                                           
          ORIF=(06,EQ,C'S'),WRITE=OUTM,                                 
 DFLT_WRITE=OUTO                                                       
//*                                                                     




Gerry
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 -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top