MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to copy remaining records to output dataset with IDCAMS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Feb 22, 2011 5:38 am    Post subject: How to copy remaining records to output dataset with IDCAMS Reply with quote

Hi,

We have a file with 100015 records - keeps varying depending on external feed. Our batch job makes use of SORT with STARTREC and ENDREC (SAVE feature too) to split it into three files for three downstream jobs. Now, We don't have SORT available for few days due to licence expiration issues. We are asked to use IDCAMS with REPRO for the same.

Can you please help how to save the remaining records (last set of records) to third file?

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Feb 22, 2011 5:40 am    Post subject: Reply with quote

I have tried using REPRO without COUNT but it ends with MAXCC=12 Sad
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Feb 22, 2011 7:27 am    Post subject: Reply with quote

well,
a quick manual search (about 10 seconds) turned-up this link to IDCAMS Repro, Optional Parameters which indicate a FROM(number) and a SKIP(number).

I leave it to you to show us the results of your developed control cards.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Feb 22, 2011 8:52 am    Post subject: Reply with quote

I've tried the REPRO with FROMNUMBER and TONUMBER but it ends with MAXCC=12 because my input file is a flat file and not an RRDS bonk
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Feb 22, 2011 9:34 am    Post subject: Reply with quote

well since you seem limited in you ability to try things new,

how about a combination of COUNT and SKIP?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Feb 22, 2011 9:45 am    Post subject: Reply with quote

Yes, that worked for first set but how about the remaining records? It fails only for the last option !
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Feb 22, 2011 9:57 am    Post subject: Reply with quote

????
FIRST ds:
count(a)

SECOND ds:
skip(a)
count(b)

third ds:
skip(a+b)

why use a count for the third set?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Feb 22, 2011 10:24 am    Post subject: Reply with quote

TTGI.BRENHOD.REPROIN is a 31 record dataset.

Code:

//STEP010  EXEC PGM=IDCAMS
//INSET1   DD  DSN=TTGI.BRENHOD.REPROIN,
//             DISP=SHR
//OUTSET1  DD  DSN=TTGI.BRENHOD.REPROO1,
//             DISP=SHR
//OUTSET2  DD  DSN=TTGI.BRENHOD.REPROO2,
//             DISP=SHR
//OUTSET3  DD  DSN=TTGI.BRENHOD.REPROO3,
//             DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
    REPRO -
      INFILE(INSET1) -
      OUTFILE(OUTSET1) -
           COUNT(10)
    REPRO -
      INFILE(INSET1) -
      OUTFILE(OUTSET2) -
           SKIP(10) -
           COUNT(10)
    REPRO -
      INFILE(INSET1) -
      OUTFILE(OUTSET3) -
           SKIP(20)
/*




this is the output of the run:
Code:

IDCAMS  SYSTEM SERVICES                                           TIME: 15:18:05

    REPRO -
      INFILE(INSET1) -
      OUTFILE(OUTSET1) -
           COUNT(10)
IDC0005I NUMBER OF RECORDS PROCESSED WAS 10
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

    REPRO -
      INFILE(INSET1) -
      OUTFILE(OUTSET2) -
           SKIP(10) -
           COUNT(10)
IDC0005I NUMBER OF RECORDS PROCESSED WAS 10
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

    REPRO -
      INFILE(INSET1) -
      OUTFILE(OUTSET3) -
           SKIP(20)
IDC0005I NUMBER OF RECORDS PROCESSED WAS 11
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0


i have not used idcams in 25 years. used the jcl in the examples,
strained my brain to figure out how to use skip and count,
and wonder of wonders -- it worked.

Laughing
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Feb 22, 2011 10:49 am    Post subject: Reply with quote

Oh Yeah.........Thanks a lot. I should've tried SKIP alone for last option........ Embarassed

One more thing, I've tried FROMNUMBER, FROMADDRESS and FROMKEY options but none works on a PS dataset Exclamation
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Feb 22, 2011 1:17 pm    Post subject: Reply with quote

ranga_subham wrote:

One more thing, I've tried FROMNUMBER, FROMADDRESS and FROMKEY options but none works on a PS dataset


yep, that's what the book says.

glad you were able to accomplish your work task.

til tomorrow.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group