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 Question

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

New User


Joined: 27 May 2009
Posts: 8
Location: Hyderabad

PostPosted: Tue Dec 29, 2009 11:56 am    Post subject: Syncsort Question
Reply with quote

Hi,

I have a file in report format like below

BILLDAY = 'Y'
MONTH = 'DEC'
CYCLE = '10'
MONTHEND = 'Y'
DAY = '1'
YEAR = '09'
CENT = '1'
UNIDT = '20091210'
Y5601 = 'N'

From the above input file I need only CYCLE and UNIDT to write in one output file in one line like first 2 bytes CYCLE and from 3rd byte to 8 bytes are UNIDT .

Can anybody help me to get this done by using sort.
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Dec 29, 2009 12:04 pm    Post subject:
Reply with quote

Posting same problem again will NOT help.
http://www.ibmmainframes.com/viewtopic.php?p=219645&highlight=#219645

need to provide many things like
Input LRECL\RECFM, SORT product being used at your shop.
Sample output etc.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Tue Dec 29, 2009 12:08 pm    Post subject: Reply to: SORT related doubt
Reply with quote

Hi Sambhaji
as soon as the TS will tell the sort product being used I will delete the useless thread
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Dec 29, 2009 12:19 pm    Post subject:
Reply with quote

Thanks Enrico.

Hi Manohar, this is toknow which sort product you are using.
Quote:
If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.
Code:

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

New User


Joined: 27 May 2009
Posts: 8
Location: Hyderabad

PostPosted: Tue Dec 29, 2009 12:55 pm    Post subject:
Reply with quote

Hi Sambhaji,

We are using SYNCSORT.

SYNCSORT FOR Z/OS 1.3.2.0R

My input file LRECL is 80 and RECFM is FB.

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

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Dec 29, 2009 1:26 pm    Post subject:
Reply with quote

Hi Manohar,
This will give you required fields in output.

Code:

//S1 EXEC PGM=SORT         
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD *           
YDEC10Y109120091210N       
//SORTOUT DD SYSOUT=*     
//SYSIN    DD    *         
  SORT FIELDS=COPY         
  INREC FIELDS=(5,2,12,8) 
/*                         

Output will be
Code:

1020091210
Back to top
View user's profile Send private message
jilumudi_manohar

New User


Joined: 27 May 2009
Posts: 8
Location: Hyderabad

PostPosted: Tue Dec 29, 2009 3:09 pm    Post subject:
Reply with quote

sambhaji...
my input file is like this...

Code:
BILLDAY = 'Y'
MONTH = 'DEC'
CYCLE = '10'
MONTHEND = 'Y'
DAY = '1'
YEAR = '09'
CENT = '1'
UNIDT = '20091210'
Y5601 = 'N'


i need a output with the values of CYCLE and UNIDT, where cycle is = 10 and unidt = 20091210 in above input file....and i need it in single record

Code:
1020091210
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Dec 29, 2009 4:35 pm    Post subject:
Reply with quote

Below is the single step SORT card for the above req
Code:
//*****************************************************
//STEP1    EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *                                       
BILLDAY = 'Y'                                         
MONTH = 'DEC'                                         
CYCLE = '10'                                           
MONTHEND = 'Y'                                         
DAY = '1'                                             
YEAR = '09'                                           
CENT = '1'                                             
UNIDT = '20091210'                                     
Y5601 = 'N'                                           
//SORTOUT  DD SYSOUT=*                                 
//SYSIN    DD *                                       
 INCLUDE COND=(1,5,SS,EQ,C'CYCLE,UNIDT')               
 INREC  IFTHEN=(WHEN=GROUP,BEGIN=(1,5,CH,EQ,C'CYCLE'),
        PUSH=(8:10,2))                                 
 OPTION COPY                                           
 OUTFIL INCLUDE=(1,5,CH,EQ,C'UNIDT'),BUILD=(8,10,80:X)


SORTOUT
Code:
1020091210
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Tue Jan 05, 2010 12:01 am    Post subject:
Reply with quote

Here is the other solution with the older version of syncsort.

Code:

//PS020    EXEC PGM=SYNCSORT
//TOOLMSG  DD SYSOUT=*                           
//DFSMSG   DD SYSOUT=*                           
//IN1      DD *                                 
BILLDAY = 'Y'                                   
MONTH = 'DEC'                                   
CYCLE = '10'                                     
MONTHEND = 'Y'                                   
DAY = '1'                                       
YEAR = '09'                                     
CENT = '1'                                       
UNIDT = '20091210'                               
Y5601 = 'N'                                     
//CTL1JNF1 DD DSN=AA.T1,         
//             DISP=(,CATLG,DELETE),             
//             UNIT=SYSDA,                       
//             SPACE=(CYL,(1,1),RLSE)           
//CTL1JNF2 DD DSN=AA.T2,         
//             DISP=(,CATLG,DELETE),             
//             UNIT=SYSDA,                       
//             SPACE=(CYL,(1,1),RLSE)           
//CTL1OF01 DD DSN=AA.FINAL,
//             DISP=(,CATLG,DELETE),             
//             UNIT=SYSDA,                       
//             SPACE=(CYL,(1,1),RLSE)           
//TOOLIN   DD *                                 
  SORT FROM(IN1) TO(CTL1JNF1) USING(CTLA)       
  SORT FROM(IN1) TO(CTL1JNF2) USING(CTLB)       
  SORT FROM(CTL1JNF1) USING(CTL1)               
//CTLACNTL DD *                                 
  SORT FIELDS=COPY                               
  INCLUDE COND=(1,5,CH,EQ,C'CYCLE')             
  OUTREC FIELDS=(10,2,SEQNUM,8,ZD)               
//CTLBCNTL DD *                                 
  SORT FIELDS=COPY                               
  INCLUDE COND=(1,5,CH,EQ,C'UNIDT')             
//CTL1CNTL DD *                     
 SORT FIELDS=COPY                   
 JOINKEYS FILES=F1,FIELDS=(3,8,A)   
 JOINKEYS FILES=F2,FIELDS=(9,8,A)   
 REFORMAT FIELDS=(F1:1,2,F2:1,8)   
 OUTFIL FILES=01                   


Code:

output:
1020091210


Thanks
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 QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am


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