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
 

 

Batch File-Aid making use of READNEXT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: Batch File-Aid making use of READNEXT
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: 1703
Location: Australia

PostPosted: Fri Feb 13, 2009 7:51 am    Post subject:
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    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Mon Feb 16, 2009 3:19 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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