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 

Merge two files laterally
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Fri Oct 08, 2004 2:11 pm    Post subject: Help Needed. I am brain dead Reply with quote

I tried the same JCL today , I am getting CON Dataset not found.

Code:


//PSTEP01  EXEC PGM=SYNCTOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN1      DD DSN=JUFACT.DNA.CASSTAT.CHADIS.OTHER,DISP=SHR
//IN2      DD DSN=JUFACT.DNA.CHARGES.GOOD,DISP=SHR
//IN3      DD DSN=JUFACT.DNA.CHADIS.OTHER,DISP=SHR
//IN4      DD DSN=JUFACT.DNA.PARTY.OTH,DISP=SHR
//T1       DD DSN=JUFACT.CS,DISP=(NEW,PASS),SPACE=(CYL,(10,10),RLSE)
//T2       DD DSN=JUFACT.CH,DISP=(NEW,PASS),SPACE=(CYL,(10,10),RLSE)
//T3       DD DSN=JUFACT.CD,DISP=(NEW,PASS),SPACE=(CYL,(10,10),RLSE)
//T4       DD DSN=JUFACT.PT,DISP=(NEW,PASS),SPACE=(CYL,(10,10),RLSE)
//CON      DD DSN=JUFACT.CS,DISP=(OLD,PASS),VOL=REF=*.T1
//         DD DSN=JUFACT.CH,DISP=(OLD,PASS),VOL=REF=*.T2
//         DD DSN=JUFACT.CD,DISP=(OLD,PASS),VOL=REF=*.T3
//         DD DSN=JUFACT.PT,DISP=(OLD,PASS),VOL=REF=*.T4
//OUT      DD DSN=JUFACT.DNA.NOT.ORDERED,DISP=(NEW,CATLG),
//            LABEL=(,SL),
//            UNIT=(SYSDA,10),
//            SPACE=(CYL,(10,10),RLSE),
//            DCB=(RECFM=FB,LRECL=109,BLKSIZE=10900)
//SORTWK01 DD SPACE=(CYL,(50,20)),UNIT=SYSDA
//SORTWK02 DD SPACE=(CYL,(50,20)),UNIT=SYSDA
//SORTWK03 DD SPACE=(CYL,(50,20)),UNIT=SYSDA
//SORTWK04 DD SPACE=(CYL,(50,20)),UNIT=SYSDA
//SYSOUT   DD SYSOUT=*
//TOOLIN   DD *
    COPY FROM(IN1) USING(CTL1)
    COPY FROM(IN2) USING(CTL2)
    COPY FROM(IN3) USING(CTL3)
    COPY FROM(IN4) USING(CTL4)
    SORT FROM(CON) USING(CTL5)
//CTL1CNTL DD *
   OUTFIL FNAMES=T1,OUTREC=(1,31,24Z,8Z,46Z)
//CTL2CNTL DD *
   OUTFIL FNAMES=T2,OUTREC=(1,13,18Z,14,24,8Z,46Z)
//CTL3CNTL DD *
   OUTFIL FNAMES=T3,OUTREC=(1,13,18Z,24Z,14,8,46Z)
//CTL4CNTL DD *
   OUTFIL FNAMES=T4,OUTREC=(1,13,18Z,24Z,8Z,14,46)
//CTL5CNTL DD *
   OPTION EQUALS
   SORT FIELDS=(1,13,CH,A)
   SUM FIELDS=(14,8,22,8,30,8,38,8,46,8,54,8,62,8,70,
               8,78,8,86,8,94,8,102,8),FORMAT=BI
   OUTFIL FNAMES=OUT
/*


 


Jes2 Errors are
Code:

 STMT NO. MESSAGE
-
        9 IGD01007I SXDC9999  NO DATACLAS ASSIGNED
       10 IGD01007I SXDC9999  NO DATACLAS ASSIGNED
       11 IGD01007I SXDC9999  NO DATACLAS ASSIGNED
       12 IGD01007I SXDC9999  NO DATACLAS ASSIGNED
       17 IGD01007I SXDCWKX2: SYSDA UNIT ASSIGNED
       18 IGD01007I SXDC9999  NO DATACLAS ASSIGNED
       19 IGD01007I SXDC9999  NO DATACLAS ASSIGNED
       20 IGD01007I SXDC9999  NO DATACLAS ASSIGNED
       21 IGD01007I SXDC9999  NO DATACLAS ASSIGNED
IEF212I JUMSB4Y1 PSTEP01 CON - DATA SET NOT FOUND
IEF272I JUMSB4Y1 PSTEP01 - STEP WAS NOT EXECUTED.
IEF373I STEP/PSTEP01 /START 2004282.1505
IEF374I STEP/PSTEP01 /STOP  2004282.1505 CPU    0MIN 00.00SEC SRB    0MIN 00.00S
IEF375I  JOB/JUMSB4Y1/START 2004282.1505
IEF376I  JOB/JUMSB4Y1/STOP  2004282.1505 CPU    0MIN 00.00SEC SRB    0MIN 00.00S


I remember Kolusu mentioning Dataclas is not required for sort DS. now it is pointing error there
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Fri Oct 08, 2004 2:26 pm    Post subject: Reply with quote

I fixed it. Hurrayyyyyyyyyyyyyyyyyy


Ok, the above jcl did give me an errror because of

Code:


//T1       DD DSN=JUFACT.CS,DISP=(NEW,PASS),SPACE=(CYL,(10,10),RLSE)
//T2       DD DSN=JUFACT.CH,DISP=(NEW,PASS),SPACE=(CYL,(10,10),RLSE)
//T3       DD DSN=JUFACT.CD,DISP=(NEW,PASS),SPACE=(CYL,(10,10),RLSE)
//T4       DD DSN=JUFACT.PT,DISP=(NEW,PASS),SPACE=(CYL,(10,10),RLSE)


Code:
DISP=(NEW,PASS),
is the culprit .

Yesterdays JCL abend with S213 because

Code:
 
//T1       DD DSN=&&CASSTAT,DISP=(,PASS),SPACE=(CYL,(10,10),RLSE)
//T2       DD DSN=&&CHARGES,DISP=(,PASS),SPACE=(CYL,(10,10),RLSE)
//T3       DD DSN=&&CHADIS,DISP=(,PASS),SPACE=(CYL,(10,10),RLSE)
//T4       DD DSN=&&PARTY,DISP=(,PASS),SPACE=(CYL,(10,10),RLSE)
//CON      DD DSN=&&CASSTAT,DISP=(OLD,PASS),VOL=REF=*.T1
//         DD DSN=&&CHARGES,DISP=(OLD,PASS),VOL=REF=*.T2
//         DD DSN=&&CHARDIS,DISP=(OLD,PASS),VOL=REF=*.T3
//         DD DSN=&&PARTY,DISP=(OLD,PASS),VOL=REF=*.T4


T3 I coded &&CHADIS
and CON 3 DD DSN , I have named it as CHARDIS with an Extra R. a Typo resulted in S213 error.
I just noticed and corrected and return code = 0 now.

Thank you people.

_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Meg
Beginner


Joined: 08 Jul 2003
Posts: 44
Topics: 16

PostPosted: Wed Oct 27, 2004 4:47 am    Post subject: Reply with quote

Is it possible to get the ouput for the same requirement Kolusu has mentioned in his first post using ordinary sort. We use only PGM=SORT in our JCLs for sorting as our clients do not encourage us to use ICETOOL for maintanence purpose. Please let me know how to create the output exactly as Kolusu's first post using the ordinary sort.
Thanks,
Meg
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12402
Topics: 75
Location: San Jose

PostPosted: Wed Oct 27, 2004 5:44 am    Post subject: Reply with quote

Meg,

It is very easy to split the ICETOOL job into a regular sort job. Each toolin operator is equivalent to a single step of sort.Try this.
Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
AAAAAAAABBBBBBBBBBCCCCCCDDDDDDEEEEEE
//T1       DD DSN=&T1,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE) 
//SYSIN    DD &
   SORT FIELDS=COPY
   OUTFIL FNAMES=T1,
   OUTREC=(1,36,18Z,80:X,SEQNUM,8,ZD)
//*
//STEP0200 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
AAAAAAAABBBBBBBBBBFFFFFFGGGGGGHHHHHH
//T2       DD DSN=&T2,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE) 
//SYSIN    DD *
   SORT FIELDS=COPY
   OUTFIL FNAMES=T2,
   OUTREC=(36Z,19,18,80:X,SEQNUM,8,ZD)
//*
//STEP0300 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=&T1,DISP=OLD
//         DD DSN=&T2,DISP=OLD
//OUT      DD DSN=YOUR OUTPUT FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1),RLSE)
//SYSIN   DD *                                     
   OPTION EQUALS                                       
   SORT FIELDS=(81,8,ZD,A)                             
   SUM FIELDS=(37,8,45,8,53,2),FORMAT=BI               
   OUTFIL FNAMES=OUT,OUTREC=(1,80)                     
/*       


Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
archandra
Beginner


Joined: 11 Aug 2005
Posts: 1
Topics: 0
Location: Pune

PostPosted: Fri Aug 19, 2005 12:11 am    Post subject: Reply with quote

hi,

I have 2 input files. The two files are having a field in common.
I want to join the two files on that field. If matches I want to write into
the output file with some info from these two files. And I want to do it
through sort card only. Is it possible.
See how the records look like in the files.
(the second field is the common one)

File 1:

name1 12345 veh1
name2 12346 veh4
name3 12347 veh3

File 2:

dep1 12344 cal
dep2 12345 wis
dep3 12346 arg

out file:

12345 veh1 wis
12346 veh4 arg
Back to top
View user's profile Send private message Yahoo Messenger
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Aug 19, 2005 4:00 am    Post subject: Reply with quote

archandra,

I really wonder if this particular thread didn't have an answer to your problem. What sort product do you have ? If you have Syncsort V 1.2 then check the following link.

http://www.mvsforums.com/helpboards/viewtopic.php?t=4690

For DFSORT, Search for the keyword SPLICE in this forum, you will get lots of threads that discusses on your problem.

Thanks,
Phantom
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Aug 19, 2005 9:50 am    Post subject: Reply with quote

archandra,

Here's a DFSORT/ICETOOL job that will do what you want. I assumed your input files have RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes. For complete information on the SPLICE operator of DFSORT's ICETOOL, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/6.13?DT=20050222160456

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
name1  12345  veh1
name2  12346  veh4
name3  12347  veh3
/*
//IN2 DD *
dep1  12344  cal
dep2  12345  wis
dep3  12346  arg
/*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD SYSOUT=*
12345  veh1  wis
12346  veh4  arg
//TOOLIN DD *
 COPY FROM(IN1) TO(T1) USING(CTL1)
 COPY FROM(IN2) TO(T1) USING(CTL2)
 SPLICE FROM(T1) TO(OUT) ON(1,5,CH) WITH(14,4)
/*
//CTL1CNTL DD *
  OUTREC FIELDS=(1:8,5,8:15,4,80:X)
/*
//CTL2CNTL DD *
  OUTREC FIELDS=(1:7,5,14:14,4,80:X)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
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