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
 

 

Can it be done by DFSORT

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

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Thu Jun 18, 2009 10:06 pm    Post subject: Can it be done by DFSORT
Reply with quote

Hi,

I have following requirement in DFSORT.

i have 2 file of diffrent record length.

File A:

Code:
AAA 123 12345
BBB 124 12345
CCC 124 12345
DDD 124 12346


File B:

Code:
12345 VVV MMMM NNNN
12346 KKK LLLLL  DDDD
12347 MMM OOO  QQQQ


Output file C:

Code:
AAA 123 12345 VVV MMMM NNNN
BBB 124 12345 VVV MMMM NNNN
CCC 124 12345 VVV MMMM NNNN
DDD 124 12346 KKK LLLLL  DDDD

File A : LRECL = 80
File B : LRECL = 1000
File C : LRECL = 300

Matching field : 12345

Can its done by DFSORT? Please let me know if u want any clarification?
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Jun 18, 2009 11:24 pm    Post subject: Reply to: Requirement in DFSORT.
Reply with quote

amsar wrote:
File A : LRECL = 80
File B : LRECL = 1000
File C : LRECL = 300

Matching field : 12345
Can its done by DFSORT? Please let me know if u want any clarification?


1. Does FILE B also have duplicates?
2. What is the position and format of the KEY in both files?
3. You mention that output length is 300. Assuming you are getting first 80 bytes from file A , where do you get the 220 bytes from FILEB?
4. Run the following job and show me the sysout which helps to determine the PTF level

Code:

//STEP0100 EXEC PGM=SORT     
//SYSOUT   DD SYSOUT=*       
//SORTIN   DD *             
//SORTOUT  DD SYSOUT=*       
//SYSIN    DD *             
  SORT FIELDS=COPY           
/*
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Fri Jun 19, 2009 1:04 pm    Post subject:
Reply with quote

Kolusu,

I have tried to give you dummy data.

1> File B doesnot have the duplicate.

2>Position of key in first file is 10:5. While in file B 1:5.

3> Yes, 220 bytes we are getting from file B.

Code:
SDSF OUTPUT DISPLAY CI3030U  JOB00263  DSID   104 LINE 0       COLUMNS 02- 81 
COMMAND INPUT ===>                                            SCROLL ===> CSR
---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8-
********************************* TOP OF DATA **********************************
AAA 123 12345                                                                   
BBB 124 12345                                                                   
CCC 124 12345                                                                   
DDD 124 12346                                                                   
******************************** BOTTOM OF DATA
********************************

Thanks,
Amol
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Fri Jun 19, 2009 1:10 pm    Post subject:
Reply with quote

Sorry i have missed sysout information.


LOCKSET COPY TECHNIQUE SELECTED
I
Code:
SIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE     
 CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 00:30 ON FRI JUN 19, 2009 -
 SORT FIELDS=COPY                                                      00060000
ECORD TYPE IS F - DATA STARTS IN POSITION 1                                     
5-K90013 C6-K90013 C7-K90000 C8-K90013 E9-K90013 C9-BASE   E5-K35433 E7-K24705 
ORTMSG  NOT FOUND - SYSOUT USED                                                 
CEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED               
I3030U .STEP0100.        , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB           
AIN STORAGE = (MAX,8192000,8178782)                                             
AIN STORAGE ABOVE 16MB = (8101342,8101342)                                     
PTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSA
PTIONS: SIZE=8192000,MAXLIM=2097152,MINLIM=204800,EQUALS=N,LIST=Y,ERET=RC16 ,MSG
PTIONS: VIO=Y,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N
PTIONS: RESALL=24000,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y
PTIONS: TMAXLIM=8192000,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=N,DSA=0   
PTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITCK=S,PARMDDN
PTIONS: HIPRMAX=OPTIMAL,DSPSIZE=128 ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=
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 Jun 19, 2009 1:26 pm    Post subject:
Reply with quote

Amsar,

Please post the line which has ICE201I as the message identifier.
Code:
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1

As this will show the level that your site is at. Unfortunately you have posted the data from a position which is too far to the right.
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Fri Jun 19, 2009 7:29 pm    Post subject:
Reply with quote

Sorry...

Code:
 Display  Filter  View  Print  Options  Help                                 
-------------------------------------------------------------------------------
SDSF OUTPUT DISPLAY CI3030T  JOB00214  DSID   102 LINE NO CHARS  'ICE020I' FOUN
COMMAND INPUT ===>                                            SCROLL ===> CSR
********************************* TOP OF DATA **********************************
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 00:19 ON FRI JUN
            SORT FIELDS=COPY                                                   
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K90013 E9-K90013 C9-BASE   E5-K35433
ICE142I 0 SORTMSG  NOT FOUND - SYSOUT USED                                     
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED   
ICE088I 0 CI3030T .STEP0100.        , INPUT LRECL = 66, BLKSIZE = 27984, TYPE =
ICE093I 0 MAIN STORAGE = (MAX,8192000,8182878)                                 
ICE156I 0 MAIN STORAGE ABOVE 16MB = (8116128,8116128)                           
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=8192000,MAXLIM=2097152,MINLIM=204800,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=Y,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=24000,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT
ICE131I 0 OPTIONS: TMAXLIM=8192000,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=128 ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri Jun 19, 2009 7:35 pm    Post subject:
Reply with quote

Code:
...........NO CHARS  'ICE020I' FOUN


all you had to do was COPY&PASTE from EXPAT's post.

Code:
ICE201I
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Fri Jun 19, 2009 7:44 pm    Post subject:
Reply with quote

Code:
SDSF OUTPUT DISPLAY CI3030T  JOB00214  DSID   102 LINE
COMMAND INPUT ===>                                   
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1


Is it Fine?

Thanks,
Amsar
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Jun 19, 2009 9:12 pm    Post subject:
Reply with quote

Amsar,

You haven't told me the position from where the 220 bytes needs to be picked in your 1000 byte file. So I assumed that it is from pos 6. If it is different then just change ONLY the CTL1CNTL card . you need to change the position highlighted here to your desired location in 81:6,220) . The following DFSORT/ICETOOL JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//I1       DD DSN=your 1000 byte non dup file,DISP=SHR
//I2       DD DSN=your 80 byte dup file,DISP=SHR             
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)         
//OUT      DD SYSOUT=*                                               
//TOOLIN   DD *                                                       
  COPY FROM(I1) USING(CTL1)                                           
  COPY FROM(I2) USING(CTL2)                                           
  SORT FROM(T1) USING(CTL3)                                           
//CTL1CNTL DD *                                                       
  OUTFIL FNAMES=T1,BUILD=(C'$',10:1,5,81:6,220)                       
//CTL2CNTL DD *                                                       
  OUTFIL FNAMES=T1,OVERLAY=(81:220X)                                 
//CTL3CNTL DD *                                                       
  SORT FIELDS=(10,5,CH,A),EQUALS                                     
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(301:SEQNUM,8,ZD,RESTART=(10,5))),
  IFTHEN=(WHEN=GROUP,BEGIN=(301,8,ZD,EQ,1),PUSH=(81:81,220))         
  OUTFIL FNAMES=OUT,BUILD=(1,300),                                   
  OMIT=(81,220,CH,EQ,C' ',OR,1,1,CH,EQ,C'$')                         
/*
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Fri Jun 19, 2009 10:30 pm    Post subject:
Reply with quote

Thanks Skolusu,

I will test and let you know the results.

Thanks,
Amol
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 DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


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