View previous topic :: View next topic
|
Author |
Message |
techslam
New User
Joined: 03 Dec 2010 Posts: 87 Location: India
|
|
|
|
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 |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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 |
|
|
techslam
New User
Joined: 03 Dec 2010 Posts: 87 Location: India
|
|
|
|
@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 |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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. |
|
Back to top |
|
|
techslam
New User
Joined: 03 Dec 2010 Posts: 87 Location: India
|
|
|
|
Is there not any simple direct way to do this ? |
|
Back to top |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
i think you can use Overlay option of sort. |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
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 |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hello,
WER* messages indicate that you have SYNCSORT not DFSORT. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
WER* messages indicate that you have SYNCSORT not DFSORT.
topic moved where it belongs ! |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
sorry for the miswording ...
I was just giving a quick and dirty explanation and posting the link to the details |
|
Back to top |
|
|
|