Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to Merging 5 VSAM into 1 VSAM and formating in 1 step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Parthiban Mohanraj

New User


Joined: 08 Oct 2008
Posts: 5
Location: Chennai

PostPosted: Wed Oct 08, 2008 11:24 am    Post subject: Need to Merging 5 VSAM into 1 VSAM and formating in 1 step
Reply with quote

Hi,

My requirement is as below:
I have 5 Vsam file. I need to merge these 5 files into one VSAM file but need only few fields in the output file from the records in the input file. Can this be accomplished in one step?
I used the below JCL

Code:

//SORTIN01 DD DSN=VSAM1
//SORTIN02...
//SORTIN05 DD DSN=VSAM5
//SORTOUT DD DSN=OPVSAM1
//SYSIN DD *
  MERGE FIELDS=(5,49,BI,A)
  OUTREC FIELDS=(5:52,10,78,10,9X)
//*


and got the error like
OUTREC not supported for this techinque.
All the input files are KSDS VB VSAM files and output is same as the input format.

Can any one give me a solution for this in DFSORT?
Back to top
View user's profile Send private message

hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Wed Oct 08, 2008 2:01 pm    Post subject:
Reply with quote

What is your key, from your sort card looks like your data is in the sorted order of 5-49 . Is this your key. If it is are you trying to replace the key??

Can you post your SORT out messages.
Back to top
View user's profile Send private message
Parthiban Mohanraj

New User


Joined: 08 Oct 2008
Posts: 5
Location: Chennai

PostPosted: Wed Oct 08, 2008 2:14 pm    Post subject: Reply to: Need to Merging 5 VSAM into 1 VSAM and formating i
Reply with quote

Yes i Merged the VSAM files based on the Keys (5-49) but in the output file i need not want the key fields.

I need only the fields starting at 52 - 102,107 - 116 .... 207 - 207 from the input files to be present in my VSAM op file in (RDW will anyway be there)<data as above from input files> format.

My sysout error message when i tried running the posted JCL is below:

Code:

            MERGE FIELDS=(56,51,BI,A)                             
            OUTREC FIELDS=(5:56,51,118,3,151,9,160,7,207,1)       
ICE101A M OUTREC       STATEMENT NOT SUPPORTED FOR TECHNIQUE USED
ICE052I J END OF DFSORT
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Wed Oct 08, 2008 3:07 pm    Post subject:
Reply with quote

Following is the explanation give by IBM for this message. Can you follow the instruction and post ICE800I, ICE800I.

ICE101Axxxxxxxxxxxx STATEMENT NOT SUPPORTED FOR TECHNIQUE USED
Explanation:
Critical. The control statement indicated by xxxxxxxxxxxx is not supported for the technique used (tape work data set sort or Conventional merge). xxxxxxxxxxxx is replaced by INCLUDE/OMIT, SUM, INREC, or OUTREC.

System action:
The program terminates.

Programmer response:
Rerun the job with a SORTDIAG DD statement to get message ICE800I. ICE800I indicates the reason Blockset could not be used. If possible, remove the condition preventing the use of Blockset. Alternatively, remove the indicated statement.


Infact I simulated your situation in my system. But there is some problem with my site and I am not getting any output from SORTDIAG.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Oct 08, 2008 8:56 pm    Post subject:
Reply with quote

If you had

//SORTDIAG DD DUMMY

in your job, you would see the following message in //SYSOUT:

ICE126A 0 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND

Quote:
All the input files are KSDS VB VSAM files and output is same as the input format.

OUTREC FIELDS=(5:52,10,78,10,9X)


Since the files are variable-length, you need to account for the RDW in the OUTREC statement. You need to specify the RDW (1,4) as the first field, and count the RDW (first 4 bytes) when determining the starting positions. Something like:

Code:

  OUTREC FIELDS=(1,4,5:52,10,78,10,9X)


If your starting positions of 52 and 78 don't count the RDW, use 56 and 82 instead.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Oct 08, 2008 8:58 pm    Post subject:
Reply with quote

Quote:
But there is some problem with my site and I am not getting any output from SORTDIAG.


Not sure what you mean by this. SORTDIAG produces additional messages in //SYSOUT.
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Thu Oct 09, 2008 3:21 pm    Post subject:
Reply with quote

Frank Yaeger wrote:
SORTDIAG produces additional messages in //SYSOUT.


What I meant was adding SORTDIAG doesn't effect my SYSOUT at all. It looks same with or without SORTDIAG. So I thought it might be a problem with my site.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Oct 09, 2008 9:43 pm    Post subject:
Reply with quote

Hello,

Please post the complete jcl, control statements, and the informational output from the execution of the step.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Oct 09, 2008 9:45 pm    Post subject:
Reply with quote

Your site may have the DIAGSIM=YES installation option set (overriding the shipped default of DIAGSIM=NO) which would always give you the diagnostic messages. You can run an ICETOOL DEFAULTS report to find out if DIAGSIM=YES is set.

Or if you want me to take a look, send me (yaeger@us.ibm.com) your complete JES and //SYSOUT messages for the run with and without //SORTDIAG.
Back to top
View user's profile Send private message
Parthiban Mohanraj

New User


Joined: 08 Oct 2008
Posts: 5
Location: Chennai

PostPosted: Fri Oct 10, 2008 4:20 pm    Post subject:
Reply with quote

Thanks for your responses!!

But still my basic question remains unanswered.
(Please refer the first post)

I tried a JCL with the below syntax
MERGE FIELDS=(5,49,BI,A)
OUTFIL FNAMES=SORTOUT,
BUILD=(1,4,5:56,51,56:118,3,59:151,9,68:160,7,75:207,1,5X)

But I got ICE077A 9 VSAM OUTPUT ERROR L(12) SORTOUT error!!

The reason for this error may be due to: The VSAM files are merged using the Primary Keys but while formatting we skip the primary key and consider only the Alternate Key along with few other fields. But this alternate Key is not in an ascending order because of which I get VSAM output error when the utility tries to write the output which is a KSDS VSAM file.

Now I am not sure whether this requirement can be accomplished in a single step JCL.

Can any one give me a solution for executing this in a single step.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Oct 10, 2008 4:24 pm    Post subject:
Reply with quote

If you are writing to a KSDS file, then the records must be in the order of the key of that KSDS file, with NO duplicate key values..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Oct 10, 2008 8:58 pm    Post subject:
Reply with quote

You can do this in one DFSORT/ICETOOl step using the following technique.

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//VSAMIN1 DD DSN=...
//VSAMIN2 DD DSN=
//**> Use a MOD data set for T1
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//VSAMOUT DD DSN=...
//TOOLIN DD *
COPY FROM(VSAMIN1) TO(T1) VSAMTYPE(V)
COPY FROM(VSAMIN2) TO(T1) VSAMTYPE(V)
SORT FROM(T1) TO(VSAMOUT) USING(CTL1)
//CTL1CNTL DD *
* Use INREC to reformat VB the records for output
   INREC BUILD=(...)
* Sort the reformatted records on the key for the output KSDS
   SORT FIELDS=(...)
/*
Back to top
View user's profile Send private message
Parthiban Mohanraj

New User


Joined: 08 Oct 2008
Posts: 5
Location: Chennai

PostPosted: Thu Oct 23, 2008 12:00 pm    Post subject:
Reply with quote

Thanks a lot it worked for me however the performance is less when compared to DFSORT (using VSAM to PS in one step and PS to VSAM in another)

Thanks again for the help
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Oct 23, 2008 9:05 pm    Post subject:
Reply with quote

Quote:
DFSORT (using VSAM to PS in one step and PS to VSAM in another)


It isn't clear what you mean by this. Show the job you're using that corresponds to this description.
Back to top
View user's profile Send private message
Parthiban Mohanraj

New User


Joined: 08 Oct 2008
Posts: 5
Location: Chennai

PostPosted: Sat Nov 29, 2008 2:15 pm    Post subject:
Reply with quote

What i meant was I created one JCL with steps executing SORT utility.
1st step will merge the VSAM into a PS file &
2nd step will format the PS file into a VSAM file.

The total time take by the above 2 steps are less than the single step ICETOOL JCL.

cheers
~Parthi
P.s. i was on vacation so couldnt reply before.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts VSAM define for large file jerryte JCL & VSAM 9 Wed Oct 05, 2016 1:51 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us