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

Reverse Copy of GDG versions in one Flat file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


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