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

Using the DCB of input file to the output


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Mon Aug 15, 2011 10:14 pm
Reply with quote

Hi,

I want to use the same layout of the input to the output file. I have used the following and result is as expected. But my problem is I want to use the same layout in the below filemaneger step as well. But while I tried to do that it is giving JCl error.

Here is the code which I prepared:
Code:
//SORT1    EXEC PGM=SORT                                   
//SYSPRINT DD  SYSOUT=*                                     
//SYSOUT   DD  SYSOUT=*                                     
//SORTIN   DD  DSN=ORD.LTCF.FRLTC$10.LCS.LP.CMB.BKUP(-2),   
//             DISP=SHR                                     
//SORTOUT  DD  DSN=PYNPRIY.TEST.PS.FILE.SORT2,             
//             DISP=(,CATLG),                               
//             SPACE=(CYL,(15,15),RLSE),                   
//             DCB=*.SORTIN                                 
//SYSIN    DD  *                                           
    SORT FIELDS=(1,10,CH,A)                                 
/* 
//FILEMGR  EXEC PGM=FMNMAIN                                                       
//STEPLIB  DD DISP=SHR,DSN=SYS1.FILEMNGR.SFMNMOD1                 
//         DD DISP=SHR,DSN=SYSC090.COBOLZOS.PROD.SIGYCOMP         
//*FMNCOB  DD DUMMY   
//SYSPRINT DD SYSOUT=*                                             
//FMNTSPRT DD SYSOUT=*                                             
//SYSTERM  DD SYSOUT=*                                             
//SYSIN    DD *                                                   
$$FILEM DSCMP TYPE=FORMATTED,                                     
.............
.............
/*                                           
//FMINSOUT DD DSN=ORD.PYNPRIY.TEST.INSERTED.T,
//         SPACE=(CYL,(15,15),RLSE),         
//         DISP=(,CATLG,DELETE),             
//         DCB=*.SORTIN                       


Can anyone tell me how can I use the SORTIN DCB to create the output dataset in the filemanager step?
Back to top
View user's profile Send private message
Heeraj

New User


Joined: 07 Dec 2010
Posts: 16
Location: Bangalore

PostPosted: Mon Aug 15, 2011 10:29 pm
Reply with quote

Hi Priyanka,
Pls add have *.STEPNAME.DDNAME. In this example try
// DCB=*.SORT1.SORTIN

Thanks,
Heeraj R
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Mon Aug 15, 2011 10:39 pm
Reply with quote

Hi Heeraj,

Can you please explain where to put this?Do you want it in the following way?
Code:

//*.FMINSOUT.ORD.PYNPRIY.TEST.INSERTED.T
//FMINSOUT DD DSN=ORD.PYNPRIY.TEST.INSERTED.T,
//         SPACE=(CYL,(15,15),RLSE),         
//         DISP=(,CATLG,DELETE),             
//         DCB=*.SORT1.SORTIN   
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Aug 15, 2011 10:45 pm
Reply with quote

Do you think that you could give the actual error messages from the sysout?
Back to top
View user's profile Send private message
Heeraj

New User


Joined: 07 Dec 2010
Posts: 16
Location: Bangalore

PostPosted: Mon Aug 15, 2011 10:48 pm
Reply with quote

Yes.

Thanks,
Heeraj R
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Mon Aug 15, 2011 11:02 pm
Reply with quote

Hi Heeraj,

I did this. This is giving me error
Code:
//SORT1.FMINSOUT.ORD.PYNPRIY.TEST.INSERTED.T         
E2 - DSS10076E - '' IS AN UNIDENTIFIED JCL STATEMENT.
//FMINSOUT DD DSN=ORD.PYNPRIY.TEST.INSERTED.T,       
//         SPACE=(CYL,(15,15),RLSE),                 
//         DISP=(,CATLG,DELETE),                     
//         DCB=*.SORT1.SORTIN                       
Back to top
View user's profile Send private message
Heeraj

New User


Joined: 07 Dec 2010
Posts: 16
Location: Bangalore

PostPosted: Mon Aug 15, 2011 11:08 pm
Reply with quote

Hi Priyanka,
Could you pls post your entire JCL statements. I am not understanding below statement.
//SORT1.FMINSOUT.ORD.PYNPRIY.TEST.INSERTED.T
What is this exactly? Am I missing something here?

Thanks,
Heeraj R
Back to top
View user's profile Send private message
Heeraj

New User


Joined: 07 Dec 2010
Posts: 16
Location: Bangalore

PostPosted: Mon Aug 15, 2011 11:12 pm
Reply with quote

I think you changed the DD Name also which is not required. Earlier posts it was //*.FMINSOUT.ORD.PYNPRIY.TEST.INSERTED.T which is considered as a comment. Now it is changed to //SORT.FMINSOUT.ORD.PYNPRIY.TEST.INSERTED.T .
Pls post your enitire job so that we can help.

Thanks,
Heeraj R
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Tue Aug 16, 2011 12:39 am
Reply with quote

Yes Heeraj. Actually i changed it as it was considered as comment. Now I am using //*.FMINSOUT.ORD.PYNPRIY.TEST.INSERTED.T and it is not giving any error. I am not sure how it is working as this is comment sentence. Can you please let me know how it works?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 16, 2011 1:20 am
Reply with quote

Priyanka Pyne

With such a basic question, are you sure that you should not be a member of the freshers and students forum icon_sad.gif
Back to top
View user's profile Send private message
Heeraj

New User


Joined: 07 Dec 2010
Posts: 16
Location: Bangalore

PostPosted: Tue Aug 16, 2011 10:44 am
Reply with quote

Hi Priyanka,
I think you need only to refer back DCB parameter, I am not sure why //*.FMINSOUT.ORD.PYNPRIY.TEST.INSERTED.T come in to picture.

//*.FMINSOUT.ORD.PYNPRIY.TEST.INSERTED.T is a commented line, so not causing any issue. Not sure what your problem over there.

It's better you go through the manuals on refer back. This forum also got lots of topics discussed on it. Pls do a search, go through it and get back if you are still not clear.

Pls note refer back is not suggested in some sites (at least in production) because it will be difficult to restart jobs using Refer back.

Thanks,
Heeraj R
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Aug 16, 2011 7:35 pm
Reply with quote

SORTIN is not a DD name for file-manager step, so file-manager step does not know about the whereabouts of SORTIN and throws an error.

Here is a small example for how to use referback statement:
Code:
\\step1 exec pgm=iefbr14
\\dd1 dd dsn=dataset1,disp=(new,catlg,delete)
\\step2 exec .....
\\step3 exec pgm=iefbr14
\\dd1 dd dsn=dataset2,DCB=*.step1.dd1

So for your Job, use:
Quote:
//FMINSOUT DD DSN=ORD.PYNPRIY.TEST.INSERTED.T,
// SPACE=(CYL,(15,15),RLSE),
// DISP=(,CATLG,DELETE),
// DCB=(*.SORT1.SORTIN)
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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
Search our Forums:

Back to Top