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

Joining 2 Datasets


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

New User


Joined: 03 Dec 2010
Posts: 87
Location: India

PostPosted: Thu May 19, 2011 12:19 pm
Reply with quote

Hi

I have FILE-1 with LRECL=20
and FILE-2 with LRECL=20

I want an output file with LRECL=20.

This output files (1,10) will be that of FILE-2's (1,10) and (11,20) will be from FILE-1's (11,20)

FILE-1 :
Code:

AAAAABBBBBCCCCCDDDDD
EEEEEFFFFFGGGGGHHHHH


FILE-2
Code:

11111222223333344444
55555666667777788888


OUTPUT FILE MUST BE LIKE :

Code:

1111122222CCCCCDDDDD
5555566666GGGGGHHHHH


PLEASE ADVICE.

THANKS
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu May 19, 2011 12:33 pm
Reply with quote

As the files doesn't have any common key. what I understand your requirement is - You need to put Pos 1,10 from file2 with pos 11,20 of file1.

IS the number of records in both files same?
Back to top
View user's profile Send private message
techslam

New User


Joined: 03 Dec 2010
Posts: 87
Location: India

PostPosted: Thu May 19, 2011 12:36 pm
Reply with quote

@Dylbharat

Yes the number of records are same and there is no common key.

Yes I want to put Pos 1,10 from file2 with pos 11,20 of file1.


Please advise
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu May 19, 2011 12:40 pm
Reply with quote

The below steps you can follow to get the desired results.

1. Write a sort step to add a sequence number to file 1
2. Write a sort step to add a sequence number to file 2
3. Write a sort step to join the above created file1 and file2 on sequence number and use OUTREC/REFORMAT fields to get the desired output file.

Hope this helps. icon_smile.gif
Back to top
View user's profile Send private message
techslam

New User


Joined: 03 Dec 2010
Posts: 87
Location: India

PostPosted: Thu May 19, 2011 12:59 pm
Reply with quote

Is there not any simple direct way to do this ?
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Thu May 19, 2011 4:51 pm
Reply with quote

i think you can use Overlay option of sort.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri May 20, 2011 12:08 pm
Reply with quote

Hi,

How can i check which version of DFSORT is installed in my system? and If latest PTF is installed or not?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Fri May 20, 2011 12:29 pm
Reply with quote

Hello,
To determine the PTF level, run the below job
Code:
//S1 EXEC PGM=ICEMAN   
//SYSOUT   DD SYSOUT=* 
//SORTIN DD *           
RECORD                 
/*                     
//SORTOUT DD DUMMY     
//SYSIN   DD   *       
  OPTION COPY           
/*                     

If you see ICE201I H RECORD TYPE ... message on SYSOUT then you are on latest PTF October 2010.

For more information on determining the DFSORT level, see:

ibmmainframes.com/viewtopic.php?t=33389

Hope it helps.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri May 20, 2011 12:53 pm
Reply with quote

The below is the SYSOUT

Code:

SYNCSORT FOR Z/OS  1.3.2.0R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                         QQQQQQQQQQQQQQQQQQQ   z/OS   1.11.0   
PARMEXIT : VSCORET=12M,MSG=SC                                                 
SYSIN :                                                                       
  OPTION COPY                                                                 
WER161B  ALTERNATE PARM USED                                                   
WER276B  SYSDIAG= 661473, 2683196, 2683196, 6867000                           
WER164B  8,864K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 272K BYTES USED                         
WER146B  32K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
WER410B  7,836K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,       
WER410B     0 BYTES RESERVE REQUESTED, 156K BYTES USED                         
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
WER416B  BSAM WAS USED FOR SORTIN                                             
WER416B  BSAM WAS USED FOR SORTOUT                                             
WER054I  RCD IN          1, OUT          1                                     
WER169I  RELEASE 1.3 BATCH 0494 TPF LEVEL 2.0                                 
WER052I  END SYNCSORT - XXXXXXX,S1,,DIAG=8000,428E,A80C,0064,C8F2,6CA3,2A08,6C
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Fri May 20, 2011 12:57 pm
Reply with quote

Hello,
WER* messages indicate that you have SYNCSORT not DFSORT.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri May 20, 2011 1:02 pm
Reply with quote

WER* messages indicate that you have SYNCSORT not DFSORT.
topic moved where it belongs !
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri May 20, 2011 2:44 pm
Reply with quote

But We have DFSORT also installed in our system - as when we do load replace/Reorg on a Table - Then we see

Code:

ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 04:20 ON SUN M
          SORT FIELDS=(00006.0,00000.4,A,00012.0,00023.0,A,00001.0,00005.0,A),F
                         MAT=BI,FILSZ=E000000000055782                         
          RECORD TYPE=F,LENGTH=(0034,0034,0034)                               
          OPTION MSGPRT=ALL,MSGDDN=UTPRINT,MAINSIZE=098304K                   
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICE751I 0 C5-K90025 C6-K90025 C7-K54603 C8-K62201 E4-K51707 C9-BASE   E5-K62201
ICE193I 0 ICEAM2 INVOCATION ENVIRONMENT IN EFFECT - ICEAM2 ENVIRONMENT SELECTED
ICE089I 1 PITA3V3W.PROC16  .STEP010 , INPUT LRECL = 34, TYPE = F               
ICE092I 0 MAIN STORAGE = (100663296,100663296,100663296)                       
ICE156I 0 MAIN STORAGE ABOVE 16MB = (100565744,100565744)                     
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y
ICE128I 0 OPTIONS: SIZE=100663296,MAXLIM=2097152,MINLIM=450560,EQUALS=N,LIST=Y,
ICE129I 0 OPTIONS: VIO=N,RESDNT=NONE,SMF=SHORT,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT
ICE130I 0 OPTIONS: RESALL=0,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,


Can you please tell me - When I use PGM=SORT - Then how can i specify to use DFSORT or SYNCSORT?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri May 20, 2011 3:05 pm
Reply with quote

You have it, but there is no provision to use it on its own

DB2 installs its own copy of DFSORT for db2 internal use

1) db2 sort processing is optimized and tested for DFSORT
2) as a side concern in case of misbehavior no fighting about it' s Your sort, no it's Your DB2

see for details
www.ibm.com/support/docview.wss?uid=isg1II14047
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri May 20, 2011 3:17 pm
Reply with quote

Thanks enrico for the reply.

But there are some Date functions in DFSORT that works in in latest DFSORT version... But I am not able to use them.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri May 20, 2011 3:21 pm
Reply with quote

as I said before You are not using DFSORT in Your JCL streams
You are using the SORT product licensed to Your organization !
the functions available should be checked against the manuals of the product used

/repeat on
DFSORT is there but only used internally by DB2
it is not available for general use

did You care to read and understand the document in the link provided ?
everything is explained there very very accurately
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri May 20, 2011 11:28 pm
Reply with quote

Quote:
DB2 installs its own copy of DFSORT for db2 internal use


DB2 does NOT install DFSORT. DB2 proper uses its own internal sort. DB2 Utilities uses DFSORT regardless of whether the site is licensed for DFSORT or not.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri May 20, 2011 11:33 pm
Reply with quote

Quote:
Can you please tell me - When I use PGM=SORT - Then how can i specify to use DFSORT or SYNCSORT?


When you specify PGM=SORT, the primary sort product at your site is invoked. If your primary sort product is DFSORT, then DFSORT will be used. If your primary sort product is Syncsort, then Syncsort will be used.

Some sites have one sort product installed as the primary sort and the other sort product installed in private libraries. In that case, if you know which private libraries the other sort product is installed in (your System Programmers should know), you can JOBLIB or STEPLIB to those libraries to invoke the other sort product.

But I suspect your site is only licensed for Syncsort, so you can't use DFSORT via PGM=SORT.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Sat May 21, 2011 12:35 am
Reply with quote

sorry for the miswording ...
I was just giving a quick and dirty explanation and posting the link to the details icon_redface.gif
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 JES datasets IO Error ABENDS & Debugging 3
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
Search our Forums:

Back to Top