Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Problem facing in sort step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 367
Location: Earth

PostPosted: Thu May 26, 2005 12:33 pm    Post subject: Problem facing in sort step
Reply with quote

Hi,
I am executing a step in my JCL. The program is in assembler & IMS. There is one internal sort in the program. Previously temporary files are used for that purpose. That is program is creating the file and sort it. After that a FTP step, which will FTP the sorted file to a server.
My requirement is to create the file as GDG. But i am getting JCL error.
The JCL is as following:
Code:

//STEP1 EXEC PGM=DFSRRC00,                               
//          PARM=&CAPARM                                     
//STEPLIB   DD DSN=
//         DD DSN=IMSMAT1.RESLIB,DISP=SHR                     
//         DD DSN=IMSMAT1.APPL.RESLIB,DISP=SHR               
//         DD DSN=IMSMAT1.SYSTEM.RESLIB,DISP=SHR             
//IMS      DD DISP=SHR,DSN=
//         DD DSN=IMSMAT1.DBDLIB,DISP=SHR                     
//         DD DSN=IMSMAT1.PSBLIB,DISP=SHR                     
//DFSVSAMP DD DSN=TEST.APPLIB.PROCCARD
//               (ABMVSAM4),DISP=SHR     
//IEFRDER   DD DCB=(TRTCH=NOCOMP,RECFM=VB,                   
//             LRECL=10236,BLKSIZE=16000),                   
//             DISP=(,PASS,),                                 
//             DSN=&&TESTLOG,                                 
//             UNIT=TAPE,                                     
//             VOL=(,RETAIN,,10)                             
//IEFRDER2 DD DUMMY                                       
//DFSRESLB DD DSN=IMSMAT1.RESLIB,DISP=SHR                 
//SYSOUT   DD SYSOUT=T                                     
//SYSUDUMP DD SYSOUT=T                                     
//INFILE   DD DISP=SHR,DSN=TEST.FILE.HIST2               
//INFILE1   DD DISP=SHR,DSN=TEST.FILE1.G0198.CYC 
//INFILE2   DD DISP=SHR,DSN=TEST.ABA01V.HIST3               
//INFILE3  DD DISP=SHR,DSN=TEST.ABA01V.REVMON             
[b]//OUTFILE  DD DSN=TEST.OUT.FILE(+1),                              [/b]
//             DISP=(NEW,CATLG,DELETE),                           
//             DCB=(RECFM=FB,LRECL=90,BLKSIZE=0),         
//             UNIT=DISK,                                 
//             SPACE=(CYL,(5,1),RLSE)                     
[b]//SORTIN   DD DISP=SHR,DSN=TEST.OUT.FILE(+1)[/b]
//SORTOUT  DD DSN=&&TEMSORT,                               
//            DISP=(,PASS),                               
//            DCB=(RECFM=FB,LRECL=296,BLKSIZE=8880,BUFNO=2)


But when i am giving the GDG in the sortin step, it shows JCL error, Disp parameter is invalid. How can i solve that problem.
Back to top
View user's profile Send private message
References
avalanches

New User


Joined: 10 May 2005
Posts: 28

PostPosted: Thu May 26, 2005 12:39 pm    Post subject:
Reply with quote

Just curious if you have tried changing the DISP parameter to OLD. I guess that could solve your problem.
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 367
Location: Earth

PostPosted: Thu May 26, 2005 1:27 pm    Post subject: Re: Problem facing in sort step
Reply with quote

Hi,
I have tried it. But old is also not taken.
Back to top
View user's profile Send private message
SteveConway

New User


Joined: 26 May 2005
Posts: 30
Location: Northern VA, USA

PostPosted: Thu May 26, 2005 6:20 pm    Post subject: Re: Problem facing in sort step
Reply with quote

You can not create a +1 GDG in a job step and reference it in the same step with a different DD.
Here's a workaround. Create the dataset as a standard sequential file, DISP=(NEW,CATLG,DELETE).
Code:

//OUTFILE  DD DSN=TEST.OUT.TEMP,
//            DISP=(NEW,CATLG,DELETE),                           
//            DCB=(RECFM=FB,LRECL=90,BLKSIZE=0),         
//            UNIT=DISK,                                 
//            SPACE=(CYL,(5,1),RLSE)                     
//SORTIN   DD DISP=SHR,DSN=TEST.OUT.TEMP


Add an IEBGENER step following your current step to make the GDG.
Code:

//CRE8GDG  PGM=IEBGENER
//*
//SYSPRINT  DD SYSOUT=*
//SYSUT1    DD DISP=SHR,DSN=TEST.OUT.TEMP
//SYSUT2    DD DSN=TEST.OUT.FILE(+1),
//             DISP=(NEW,CATLG,DELETE),                           
//             DCB=(RECFM=FB,LRECL=90,BLKSIZE=0),         
//             UNIT=DISK,                                 
//             SPACE=(CYL,(5,1),RLSE)                     
//SYSIN     DD DUMMY


Cheers,,,Steve
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 367
Location: Earth

PostPosted: Thu May 26, 2005 9:17 pm    Post subject: Re: Problem facing in sort step
Reply with quote

Hi,
Thanks a lot Steve.
Back to top
View user's profile Send private message
SteveConway

New User


Joined: 26 May 2005
Posts: 30
Location: Northern VA, USA

PostPosted: Thu May 26, 2005 9:51 pm    Post subject:
Reply with quote

You're welcome.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1