Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Data concatenation in a file thru SYNCSORT/FILE-AID/ISPF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
salil_shivhare

New User


Joined: 25 Nov 2003
Posts: 5
Location: mumbai

PostPosted: Fri Jun 16, 2006 8:21 pm    Post subject: Data concatenation in a file thru SYNCSORT/FILE-AID/ISPF
Reply with quote

Hi,

I am trying to concatenate two data records of different file into a signle file.
file1 : LRECL :80
file2 : LRECL :50

Out-file : LRECL: 130,should contain file1 data in first 80 bytes then in next 50 bytes file2 data.

I don't have ICETOOL in my shop,so I can't use SPLICE operator.

I know a simple COBOL pgm can provide the solution for this.

My question is: Can it be done thru SYNCSORT/FILE-AID/ISPF?

Regards,
Salil
Back to top
View user's profile Send private message

salil_shivhare

New User


Joined: 25 Nov 2003
Posts: 5
Location: mumbai

PostPosted: Mon Jun 19, 2006 12:00 pm    Post subject: Re: Data concatenation in a file thru SYNCSORT/FILE-AID/ISPF
Reply with quote

Hi,

I got a work around for the same in ISPF.
But problem is we need this be done in batch mode with the schedule job.So, SYNCSORT/FILE-AID control card would work for me.

Any kind of help would be appriciated.

Regards,
Salil
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Mon Jun 19, 2006 1:28 pm    Post subject:
Reply with quote

Hi,
Which release of SYNCSORT you are haivng in your shop? ,If it is SYNCSORT FOR Z/OS 1.2.0.0RI,Please let me know.I will post the reply for you.

Thanks
Kirshy
Back to top
View user's profile Send private message
salil_shivhare

New User


Joined: 25 Nov 2003
Posts: 5
Location: mumbai

PostPosted: Mon Jun 19, 2006 2:01 pm    Post subject: Re: Data concatenation in a file thru SYNCSORT/FILE-AID/ISPF
Reply with quote

Kirshy,

Thanks for your response. In our shop we are using SYNCSORT FOR Z/OS 1.1.0.

Anyway I would like to know the solution for it in SYNCSORT 1.2.0 & relevant manual for it. As,its difficult to get SYNSORT refrence manual for mainframe even in GOOGLE.

Regards,
Salil
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Mon Jun 19, 2006 4:58 pm    Post subject:
Reply with quote

Hi,
Here is the solution with SYNCSORT FOR Z/OS 1.2.0.0RI.



Code:

//PS020    EXEC PGM=SYNCTOOL                       
//TOOLMSG  DD SYSOUT=*                             
//DFSMSG   DD SYSOUT=*                             
//IN1      DD DSN=XXXX.A1,DISP=SHR             
//IN2      DD DSN=XXXX.A2,DISP=SHR             
//CTL1JNF1 DD DSN=XXXXXX.T1,           
//            DISP=(,CATLG,DELETE),               
//            UNIT=SCRPK,                         
//            SPACE=(CYL,(55,55),RLSE)             
//CTL1JNF2 DD DSN=XXXXXX.T2,           
//            DISP=(,CATLG,DELETE),               
//            UNIT=SCRPK,                         
//            SPACE=(CYL,(55,55),RLSE)             
//CTL1OF01 DD DSN=XXXXXXX.T3,           
//            DISP=(,CATLG,DELETE),               
//            UNIT=SCRPK,                         
//            SPACE=(CYL,(55,55),RLSE)             
//TOOLIN    DD *                                   
  SORT FROM(IN1) TO(CTL1JNF1) USING(CTL0)         
  SORT FROM(IN2) TO(CTL1JNF2) USING(CTLA)         
  SORT FROM(CTL1JNF1) USING(CTL1)                 
//CTL0CNTL  DD *                                   
  SORT FIELDS=COPY                                 
  OUTREC FIELDS=(1,80,SEQNUM,8,ZD)--->Create the sequence number from 81 position                 
//CTLACNTL  DD *                                   
  SORT FIELDS=COPY                                 
  OUTREC FIELDS=(1,50,30X,SEQNUM,8,ZD)--->Create the sequence number from 81 position                             
//CTL1CNTL  DD *                                   
  JOINKEYS FILES=F1,FIELDS=(81,08,A)
  JOINKEYS FILES=F2,FIELDS=(81,08,A)
  REFORMAT FIELDS=(F1:1,80,F2:1,50)               
  SORT FIELDS=COPY                                 
  OUTFIL FILES=01,OUTREC=(1,130)                   
/*                     

Here the file (IN1) is of 80 in length and in FB format.the file (IN2) is of 50 in length and in FB format.



If your input consits only the numerics,the below JCL might help you.

Code:


//PS020    EXEC PGM=ICETOOL                                           
//*                                                                   
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN1      DD *                                                       
24302003                                                             
12345678                                                             
//IN2      DD *                                                       
           12122004                                                   
           12345678                                                   
//T1       DD DSN=aaaa.T3,                                         
//            DISP=(NEW,CATLG,DELETE),                               
//            UNIT=SCRPK,                                             
//            SPACE=(TRK,(1,1),RLSE)                                 
//T2       DD DSN=bbbb.T4,                                         
//            DISP=(NEW,CATLG,DELETE),                               
//            UNIT=SCRPK,                                             
//            SPACE=(TRK,(1,1),RLSE)                                 
//CON      DD DSN=aaaa.T3,DISP=SHR,VOL=REF=*.T1                   
//         DD DSN=bbbb.T4,DISP=SHR,VOL=REF=*.T2                   
//OUT      DD DSN=cccc.TEST.OT,               *24302003  12122004 
//            DISP=(NEW,CATLG,DELETE),                               
//            UNIT=SCRPK,                                             
//            SPACE=(TRK,(1,1),RLSE)                                 
//TOOLIN   DD *                                                       
   COPY FROM(IN1) USING(CTL1)                                         
   COPY FROM(IN2) USING(CTL2)                                         
   SORT FROM(CON) USING(CTL3)                                         
//CTL1CNTL DD *                                                       
   OUTFIL FNAMES=T1,OUTREC=(1,8,C'00000000000',80:X,SEQNUM,8,ZD)     
//CTL2CNTL DD *                                                       
   OUTFIL FNAMES=T2,OUTREC=(C'00000000000',12,8,80:X,SEQNUM,8,ZD)     
//CTL3CNTL DD *                                                       
   OPTION EQUALS                                                     
   SORT FIELDS=(81,8,ZD,A)                                           
   SUM FIELDS=(1,8,9,11),FORMAT=ZD                                   
   OUTFIL FNAMES=OUT,OUTREC=(1,8,3X,12,8,80:X)                       
/*                                                                   



Thank you
Krishy
Back to top
View user's profile Send private message
salil_shivhare

New User


Joined: 25 Nov 2003
Posts: 5
Location: mumbai

PostPosted: Tue Jun 20, 2006 11:02 am    Post subject: Re: Data concatenation in a file thru SYNCSORT/FILE-AID/ISPF
Reply with quote

Kirshy,

Thanks a lot. Could you plz provide me the URL from where I can download manual for SYNCTOOL.

Salil
Back to top
View user's profile Send private message
salil_shivhare

New User


Joined: 25 Nov 2003
Posts: 5
Location: mumbai

PostPosted: Tue Jun 20, 2006 3:29 pm    Post subject: Re: Data concatenation in a file thru SYNCSORT/FILE-AID/ISPF
Reply with quote

Kirshy,

I think you have to help me out for the error as well which I am getting while running the JCL.Its due to unavailability of good manual of SYNCTOOL.

Here is the JCL:

//VS90042T JOB (1,74117,REPORT),'TEST ',

// MSGCLASS=9,NOTIFY=&SYSUID

//PS020 EXEC PGM=SYNCTOOL

//TOOLMSG DD SYSOUT=*

//DFSMSG DD SYSOUT=*

//IN1 DD DSN=VS90042.SYNCMRG.IN1,DISP=SHR

//IN2 DD DSN=VS90042.SYNCMRG.IN2,DISP=SHR

//CTL1JNF1 DD DSN=VS90042.T1,DISP=(OLD,CATLG,DELETE)

//CTL1JNF2 DD DSN=VS90042.T2,DISP=(OLD,CATLG,DELETE)

//CTL1OF01 DD DSN=VS90042.SYNCMRG.OUT,

// DISP=(OLD,CATLG,DELETE),

// SPACE=(CYL,(55,55),RLSE)

//TOOLIN DD *

SORT FROM(IN1) TO(CTL1JNF1) USING(CTL0)

SORT FROM(IN2) TO(CTL1JNF2) USING(CTLA)

SORT FROM(CTL1JNF1) USING(CTL1)

//CTL0CNTL DD *

SORT FIELDS=COPY

OUTREC FIELDS=(1,80,SEQNUM,8,ZD)

//CTLACNTL DD *

SORT FIELDS=COPY

OUTREC FIELDS=(1,50,SEQNUM,8,ZD)

//CTL1CNTL DD *

JOINKEYS FILES=CTL1JNF1,FIELDS=(81,08,A)

JOINKEYS FILES=CTL1JNF2,FIELDS=(81,08,A)

REFORMAT FIELDS=(CTL1JNF1:1,80,CTL1JNF2:1,50)

SORT FIELDS=COPY

OUTFIL FILES=01,OUTREC=(1,130)

/*

Here is the error msg:
CTL1CNTL : JOINKEYS,JOINKEYS,REFORMAT

*

SORT FIELDS=COPY

OUTFIL FILES=01,OUTREC=(1,130)

PARMLIST :

OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=CTL1JNF1,SORTDD=CTL1,DYNALLOC

WER428I CALLER-PROVIDED IDENTIFIER IS "0003"

WER131I PARM FIELD ERROR -

WER161B ALTERNATE PARM USED

I tired to search above error code in the google but unfortunately no luck.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us