MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Entire file as Instream data with hardcoded data

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Fri Feb 13, 2009 8:07 pm    Post subject: Entire file as Instream data with hardcoded data Reply with quote

Is it possible to supply physical file in instream data along with hardcoded data?

Code:

//SYSIN      *
FASTUNLOAD                 
SHRLEVEL         CHANGE     
LOAD-CONTROL     DB2LOAD   
SQL-ACCESS       EXTENSION 
...
...
...
VSAM-BUFFERS     360       
  SELECT COL1     
  FROM TABLE1     
  WHERE COL2 IN (
//           DSN=INPUT.FILE.WITH.COL2.VALUES,DISP=SHR
                       );
/*
 
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Feb 13, 2009 8:32 pm    Post subject: Reply with quote

Code:
//SYSIN DD *
 blah blah blah
/*
// DD DSN=...,DISP=...
//  DD *
 more blah blah blah
/*

_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Fri Feb 13, 2009 9:12 pm    Post subject: Reply with quote

Hi,
Thanks for reply, I am using Platinum to unload table.

When I submit a job using the way you have specified, job abends and doesn't produce error/sysout message. It creates SYSDUMP only.

Below is the card I am using

Code:
FASTUNLOAD                                         
 SHRLEVEL         CHANGE                             
 LOAD-CONTROL     DB2LOAD                           
 SQL-ACCESS       EXTENSION                         
 PRINT-OPTIONS    PTIMSG                             
 VSAM-BUFFERS     360                               
   SELECT COL1                                   
   FROM TABLE                                   
   WHERE COL2 IN (                               
/*                                                   
//      DD DSN=MY.INPUT.FILE,DISP=SHR   
//      DD *                                         
     )                                               
     ;                                               
/*                                                   
//*
Back to top
View user's profile Send private message
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Fri Feb 13, 2009 9:13 pm    Post subject: Reply with quote

Forgot to mention that everything is under //SYSIN DD *
Back to top
View user's profile Send private message
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Fri Feb 13, 2009 9:16 pm    Post subject: Reply with quote

Oh.. my bad..
I gave wrong card,

Updated card



Code:

//SYSIN   DD *
FASTUNLOAD                                           
 SHRLEVEL         CHANGE                               
 LOAD-CONTROL     DB2LOAD                             
 SQL-ACCESS       EXTENSION                           
 PRINT-OPTIONS    PTIMSG                               
 VSAM-BUFFERS     360                                 
   SELECT COL1
   FROM TABLE1
   WHERE COL2 IN (                                 
/*                                                     
//      DD DSN=My.input.file,DISP=SHR     
//      DD *                                           
     )                                                 
     ;                                                 
/*                                                     
//*
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Feb 13, 2009 9:25 pm    Post subject: Reply with quote

the my.input.file should have DCB attributes that are compatible with an inline file, for example, Fixed Block 80 records. You can also add a DCB=(LRECL=80,RECFM=FB) on the DD * statements. That may be a bit inaccurate since I can't test it right now, but hopefully the idea is right. You might want to verify that the read is OK by using the technique with IEBGENER first and make sure it can read what you are passing in.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Fri Feb 13, 2009 9:55 pm    Post subject: Reply with quote

you were right, my input file has LRECL of 20.
I changed it to 80 bytes and it worked.

Thanks for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group