|
View previous topic :: View next topic
|
| Author |
Message |
ramsri
Active User

Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
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 |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
 |
ramsri
Active User

Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
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 |
|
 |
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
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 |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|