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

concatenate sysin to dsn


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

Active User


Joined: 31 Oct 2006
Posts: 139
Location: brisbane

PostPosted: Fri May 15, 2020 5:35 am
Reply with quote

i can easily concatenate DSN to SYSIN, eg :

Code:
//SYSUT1  DD DSN=SOME.INPUT,DISP=(SHR)
//        DD *
--- some trailing comment ---
/*


but what if I want to reverse this order, ie, have the comment before the data set ?
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri May 15, 2020 7:29 am
Reply with quote

So why do you think you can't do this? -
Code:
//SYSUT1   DD  *
--- Some leading data ---
//         DD  DSN=SOME.INPUT,DISP=SHR

I prepared and ran this JCL -
Code:
//A       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  *
--- DATA IN A DATA SET ---
//SYSIN    DD  DUMMY
//SYSUT2   DD  DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,(1,1)),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//B       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  *
--- DATA IN JOB STREAM ---
//         DD  DISP=(OLD,DELETE),DSN=*.A.SYSUT2
//SYSUT2   DD  SYSOUT=*
//SYSIN    DD  DUMMY

This is what was in the data set specified by the SYSUT2 DD statement in the second step.
Code:
--- DATA IN JOB STREAM ---
--- DATA IN A DATA SET ---

Now this won't work if the DCB attributes for the disk data set are much different than the DCB sttributes assigned by JES for the DD * data set, but ...
Back to top
View user's profile Send private message
jzhardy

Active User


Joined: 31 Oct 2006
Posts: 139
Location: brisbane

PostPosted: Tue May 19, 2020 12:27 pm
Reply with quote

sorry for late reply,

no still doesn't work. I get error IEB311I - Conflicting DCB Parameters

Code:
//STEP2    EXEC PGM=IEBGENER                                     
//SYSIN    DD DUMMY                                             
//SYSPRINT DD SYSOUT=*                                           
//SYSUT1   DD *                                                 
====== START LINE                                               
//         DD DSN=&&SQLOUT,DISP=(OLD,PASS)                                     
//         DD *                                                 
===================  END:   DSNTEP2 OUTPUT  ====================
/*                                                               
//SYSUT2   DD SYSOUT=*   
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue May 19, 2020 1:25 pm
Reply with quote

Quote:
I get error IEB311I - Conflicting DCB Parameters


//SYSUT1 DD * has an LRECL=80

What has your &&SQLOUT dataset got ?

Garry.
Back to top
View user's profile Send private message
jzhardy

Active User


Joined: 31 Oct 2006
Posts: 139
Location: brisbane

PostPosted: Tue May 19, 2020 3:37 pm
Reply with quote

FB, LRECL=133
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue May 19, 2020 3:40 pm
Reply with quote

That's your problem - all in the concatenation need to have same DCB parameters. DD * will always be LRECL=80

Garry.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Tue May 19, 2020 4:38 pm
Reply with quote

Except BLKSIZE - the system can handle mixed BLKSIZEs. You don't even have to specify the largest first as you used to have to do.

If you want those two 'eyecatchers' then either use IEBGENER to create them or, easier, your sort product.
Back to top
View user's profile Send private message
jzhardy

Active User


Joined: 31 Oct 2006
Posts: 139
Location: brisbane

PostPosted: Wed May 20, 2020 2:03 am
Reply with quote

thanks, easy fix !
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 Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts COBOL reading from SYSIN COBOL Programming 1
No new posts Need help to concatenate files with w... All Other Mainframe Topics 3
Search our Forums:

Back to Top