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

SYNCSORT Sort card for formatting


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

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

PostPosted: Tue May 20, 2008 12:53 pm
Reply with quote

Hi All.

This is the formatting I need to do through SYNCSORT.

Input file, variable block(max 180)
rec structure:(comma separated,length within brackets)
field1(2),field2(3),field3(3),field4(3) or
field1(2),field2(3),field3(3),field4(3),field5(3)

input rec can be either of the two(not both together).

if its type 2, output file structure will be(fixed bloc,180)
KUMA/R/field2field3/D/CPfield4field5-field1
if its type 1, output file structure will be(fixed bloc,180)
KUMA/R/field2field3/D/CPfield4-field1
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Tue May 20, 2008 2:17 pm
Reply with quote

Hi,
Please provide the dummy info of the input and expected output to get the correct and complete solution for your problem.

Thanks
Krishy
Back to top
View user's profile Send private message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

PostPosted: Tue May 20, 2008 3:15 pm
Reply with quote

Hi.

Input VB file as I said:

Input file, variable block(max 180)
rec structure:(comma separated,length within brackets)
field1(2),field2(3),field3(3),field4(3) or
field1(2),field2(3),field3(3),field4(3),field5(3)

input rec can be either of the two(not both together).

Sample:
CO,AAE,AMS,MRS (type1)

Or

CO,AAA,ATL,PPT,QLA (type 2)


if its type 2, output file structure will be(fixed bloc,180)
KUMA/R/field2field3/D/CPfield4field5-field1
if its type 1, output file structure will be(fixed bloc,180)
KUMA/R/field2field3/D/CPfield4-field1


Output will be:

KUMA/R/AAAATL/D/CPPPTQLA-CO (IF TYPE2)

KUMA/R/AAEAMS/S/CPMRS-CO (IF TYPE 1)

KUMA/R, /D/,/S/,CP,-CO are to be hard coded from sort card

Please help!

[/b]
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Tue May 20, 2008 3:56 pm
Reply with quote

Please check the below code.

Code:

//PS020    EXEC PGM=SYNCSORT                                     
//SYSOUT   DD  SYSOUT=*                                           
//TOOLMSG  DD  SYSOUT=*                                           
//DFSMSG   DD  SYSOUT=*                                           
//IN1      DD  DSN=XXXX.XXXX.XXXXX.S.TEMP,                       
//             DISP=SHR                                           
//OUT1     DD  DSN=XXXX.XXXX.XXXXX.S.T1,                         
//             DISP=(,CATLG,DELETE),                             
//             UNIT=SCRPK,                                       
//             SPACE=(TRK,(25,25),RLSE),                         
//             DCB=(RECFM=FB,LRECL=180)                           
//OUT2     DD  DSN=XXXX.XXXX.XXXXX.S.T2,                         
//             DISP=(,CATLG,DELETE),                             
//             UNIT=SCRPK,                                       
//             SPACE=(TRK,(25,25),RLSE),                         
//             DCB=(RECFM=FB,LRECL=180)                           
//TOOLIN   DD *                                                   
   COPY FROM(IN1) USING(CTL1)                                     
//CTL1CNTL DD  *                                                 
   SORT FIELDS=COPY                                               
   OUTFIL FNAMES=OUT1,OMIT=(19,1,CH,NE,C' '),                     
   OUTREC=(C'KUMA/R/',8,3,12,3,C'/S/CP',16,3,C'-',5,2,           
           180:X),CONVERT                                         
   OUTFIL FNAMES=OUT2,INCLUDE=(19,1,CH,NE,C' '),                 
   OUTREC=(C'KUMA/R/',8,3,12,3,C'/D/CP',16,3,20,3,C'-',5,2,       
           180:X),CONVERT                                         



OUT1 will contain the Type 1 records and OUT2 contain the TYPE2 records.

Thanks
Krishy

[/code]
Back to top
View user's profile Send private message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

PostPosted: Wed May 21, 2008 10:37 am
Reply with quote

Thanks a ton Krishy!
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top