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
 

 

SYNCSORT Sort card for formatting

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SYNCSORT Sort card for formatting
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: 182
Location: hyderabad

PostPosted: Tue May 20, 2008 2:17 pm    Post subject:
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    Post subject:
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: 182
Location: hyderabad

PostPosted: Tue May 20, 2008 3:56 pm    Post subject:
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    Post subject:
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    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 Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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