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
 

 

Reverse Copy of GDG versions in one Flat file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shivashunmugam Muthu

Active User


Joined: 22 Jul 2005
Posts: 114
Location: Chennai

PostPosted: Tue Aug 02, 2005 4:50 pm    Post subject: Reverse Copy of GDG versions in one Flat file
Reply with quote

I have taken dump of GDG by using base into flat file using IEBGENER
utility. In flat file it is copying the latest version first and the old
versions next. But I want to copy them in reverse order. i.e. old version
first and latest version next. Here is example of the problem

Input GDG:
First version:
10
20
30
40

Second version:
11
21
41

Third version
23
33

If I copy the GDG by using base the output file looks like this
Output file (flat file)
23
33
11
21
41
10
20
30
40


But I want to copy them in reverse order. i.e. the output should look like
this
10
20
30
40
11
21
41
23
33

guyz..pls advise....
Back to top
View user's profile Send private message

shivashunmugam Muthu

Active User


Joined: 22 Jul 2005
Posts: 114
Location: Chennai

PostPosted: Tue Aug 02, 2005 5:27 pm    Post subject: Re: Reverse Copy of GDG versions in one Flat file
Reply with quote

Sorry hav this below

See below for the JCL's

JOB 1
Code:

//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD DSN=&&L,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//SYSIN DD *
LISTCAT ENT('GDG BASE HERE') NAME
//*
//***************************************************************
//STEP020 EXEC PGM=ICETOOL
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=&&L,DISP=(OLD,DELETE)
//TMP DD DSN=&&T,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE),RECFM=FB
//CARD DD DSN=&&CARD,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TOOL DD DSN=&&TOOL,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//DD DD DSN=&&DD,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//INPUT DD DSN=&&INPUT,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(TMP) USING(CTL2)
//CTL1CNTL DD *
OUTFIL FNAMES=TMP,CONVERT,OUTREC=(6,80)
//CTL2CNTL DD *
INCLUDE COND=(4,7,CH,EQ,C'NONVSAM')
OUTFIL FNAMES=DD,
OUTREC=(C'//',10X,
C'DD',X,
C'DSN=',17,27,
C',DISP=SHR',
26X)
/*
//*
//STEP030 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&DD,DISP=(OLD,DELETE)
//OUT1 DD DSN=OUTFILE1(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(LRECL=78,RECFM=FB,BLKSIZE=0)
//OUT2 DD DSN=OUTFILE2(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(LRECL=78,RECFM=FB,BLKSIZE=0)
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUT1,ENDREC=1,OUTREC=(C'//SORTIN',4X,13,66)
OUTFIL FNAMES=OUT2,SAVE
/*
//*
//STEP040 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=OUTFILE1(+1),DISP=SHR
// DD DSN=OUTFILE2(+1),DISP=SHR
//SORTOUT DD DSN=MYPDS(SORTSYS),DISP=OLD
//SYSIN DD *
SORT FIELDS=COPY
/*
//*


JOB 2
Code:

//MYLIB JCLLIB ORDER=(MYPDS)
//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTINF INCLUDE MEMBER=SORTSYS
//SORTOUT DD DSN=OUTFILE3(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(*.SORTIN)
//SYSIN DD *
SORT FIELDS=COPY
/*
Back to top
View user's profile Send private message
poolarajesh

New User


Joined: 22 Jan 2004
Posts: 4

PostPosted: Tue Aug 02, 2005 5:48 pm    Post subject: Re: Reverse Copy of GDG versions in one Flat file
Reply with quote

In our project we don't have ICETOOL. Can anyone suggest me other way of solving this problem.

Rajesh P
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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