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
 

 

create a new output file from difeirent columns of input

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

New User


Joined: 17 May 2010
Posts: 7
Location: Detroit

PostPosted: Tue May 18, 2010 11:58 pm    Post subject: create a new output file from difeirent columns of input
Reply with quote

Hi,
I want to create a output file by using different columns of input file using sort utility.

Input file:
Code:
JOBNAME  = BVVV600Z                       VFG USERID DETAIL  REPORT   
PROGRAM  = BEVY600Z                  FOR THE MONTH OF MAR 2010 -
REPORTED = REV60002                    05555 -                         
                                                                       
                                                                       
 USER ID     USER NAME                    #OF RECEIPTS                 
=========    ===========================                   
 TA0707NAG     N. GALLMEYER                      15                     
===============================================               
                                TOTAL                     15                     
===============================================               
JOBNAME  = BVVV600Z                       VFG USERID DETAIL  REPORT   
PROGRAM  = BVVV600Z                  FOR THE MONTH OF MAR 2010 -
REPORTID = RVV60002                    04444 -KKINK CASTING           
                                                                       
                                                                       
 USER ID     USER NAME                    #OF RECEIPTS                 
=========    ===========================                 
 T2320NW     NOEL WOOD                          6 

**************
Output file should look like:

Code:
05555 T0707NG  N. GALLMEYER      15 
04444 T2320NW  NOEL WOOD        6   


Please help me with this:
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed May 19, 2010 12:31 am    Post subject: Reply to: create a new output file from difeirent columns of
Reply with quote

weejai,

Use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                       
JOBNAME  = BVVV600Z                       VFG USERID DETAIL  REPORT   
PROGRAM  = BEVY600Z                  FOR THE MONTH OF MAR 2010 -       
REPORTID = REV60002                    05555 -                         
                                                                       
                                                                       
 USER ID     USER NAME                    #OF RECEIPTS                 
=========    ===========================                               
 TA0707NAG     N. GALLMEYER                      15                   
===============================================                       
                                TOTAL                     15           
===============================================                       
JOBNAME  = BVVV600Z                       VFG USERID DETAIL  REPORT   
PROGRAM  = BVVV600Z                  FOR THE MONTH OF MAR 2010 -       
REPORTID = RVV60002                    04444 -KKINK CASTING           
                                                                       
                                                                       
 USER ID     USER NAME                    #OF RECEIPTS                 
=========    ===========================                               
 T2320NW     NOEL WOOD                            6                   
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                       
  SORT FIELDS=COPY                                                     
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,8,CH,EQ,C'REPORTID'),             
  PUSH=(81:40,6))                                                     
  OUTFIL BUILD=(81,6,1,74),                                           
  INCLUDE=(81,1,CH,GT,C' ',AND,2,1,CH,EQ,C'T')                         
//*
Back to top
View user's profile Send private message
weejai

New User


Joined: 17 May 2010
Posts: 7
Location: Detroit

PostPosted: Wed May 19, 2010 12:16 pm    Post subject: Reply to: create a new output file from difeirent columns of
Reply with quote

Thanks for the quick reply.i will try this.
Back to top
View user's profile Send private message
weejai

New User


Joined: 17 May 2010
Posts: 7
Location: Detroit

PostPosted: Wed May 19, 2010 6:13 pm    Post subject: Reply to: create a new output file from difeirent columns of
Reply with quote

This is failing with SYNTAX ERROR:

Code:
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                 
  INREC IFTHEN= (WHEN=GROUP,BEGIN=1,8,CH,EQ,C'REPORTID'),         
  PUSH=(81:40,6))                                                   
  OUTFIL BUILD= (81,6,1,74),                                       
  INCLUDE= (81,1,CH,GT,C' ',AND,2,1,CH,EQ,C'T')                     
//*     


SO PLEASE ADVISE
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed May 19, 2010 6:16 pm    Post subject:
Reply with quote

Please post the output showing the syntax error(s). Please also show the message ids being displayed.

Also, please learn to use the code tags for easier displays. Your previous post has been amended.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed May 19, 2010 7:47 pm    Post subject:
Reply with quote

Hello,

Quote:
This is failing with SYNTAX ERROR:
Expat did not mention that today is not Psychic Day. . . On Psychic Day some here at the forum can read minds. Not today, so you have to post something for us to work with.

Saying "if didn't work" just wastes everyone's time and does not get you an answer. . .
Back to top
View user's profile Send private message
weejai

New User


Joined: 17 May 2010
Posts: 7
Location: Detroit

PostPosted: Wed May 19, 2010 7:57 pm    Post subject: Reply to: create a new output file from difeirent columns of
Reply with quote

this is the log iam getting from the error msg:

Code:
 SYNCSORT FOR Z/OS  1.3.0.3R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                             Chrysler LLC   z/OS   1.9.0       
 SYSIN :                                                                       
   SORT FIELDS=COPY                                                             
   INREC IFTHEN= (WHEN=GROUP,BEGIN=1,8,CH,EQ,C'REPORTID'),                     
         *                                                                     
   PUSH=(81:40,6))                                                             
   *                                                                           
   OUTFIL BUILD= (81,6,1,74),                                                   
          *                                                                     
   INCLUDE= (81,1,CH,GT,C' ',AND,2,1,CH,EQ,C'T')                               
          *                                                                     
 WER268A  INREC STATEMENT   : SYNTAX ERROR                                     
 WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT                               
 WER268A  OUTFIL STATEMENT  : SYNTAX ERROR                                     
 WER268A  INCLUDE STATEMENT : SYNTAX ERROR                                     
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed May 19, 2010 8:03 pm    Post subject:
Reply with quote

PLEASE learn to use the code tags to display your input / output.

weejai wrote:
SO PLEASE ADVISE
Do not use all caps as this is interpretted as shouting and / or being rude.

Why have you got spaces following the = in your sysin stream ?

Topic moved to the JCL forum as the product in question is SYNCSORT and not DFSORT.
Back to top
View user's profile Send private message
weejai

New User


Joined: 17 May 2010
Posts: 7
Location: Detroit

PostPosted: Wed May 19, 2010 9:03 pm    Post subject: Reply to: create a new output file from difeirent columns of
Reply with quote

i have removed spaces following the = in the sysin stream but still its giving error msg:

Input Code:


Code:
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                           
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,8,CH,EQ,C'REPORTID'),   
  PUSH=(81:40,6))                                           
  OUTFIL BUILD=(81,6,1,74),                                 
  INCLUDE=(81,1,CH,GT,C' ',AND,2,1,CH,EQ,C'T')               
//*                                                         

Error msg code:
Code:
SYSIN :                                                             
  SORT FIELDS=COPY                                                 
  INREC IFTHEN=(WHEN=GROUP,BEGIN=1,8,CH,EQ,C'REPORTID'),           
                     *                                             
  PUSH=(81:40,6))                                                   
  OUTFIL BUILD=(81,6,1,74),                                         
  INCLUDE=(81,1,CH,GT,C' ',AND,2,1,CH,EQ,C'T')                     
WER268A  INREC STATEMENT   : SYNTAX ERROR                           
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                       
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
weejai

New User


Joined: 17 May 2010
Posts: 7
Location: Detroit

PostPosted: Wed May 19, 2010 10:39 pm    Post subject: Reply to: create a new output file from difeirent columns of
Reply with quote

please help me with the code as i need to figure it out.

thanks
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed May 19, 2010 11:05 pm    Post subject:
Reply with quote

There is no WHEN=GROUP in Syncsort, you'll need to use a logical expression instead.....
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu May 20, 2010 3:09 pm    Post subject:
Reply with quote

CICS Guy wrote:
There is no WHEN=GROUP in Syncsort, you'll need to use a logical expression instead.....
With older versions of SyncSort it's true, however, starting SyncSort for z/OS, Release 1.3, level 1.3.2 of SyncSort for z/OS Release IFTHEN parameter has been enhanced to include the WHEN=GROUP subparameter.
Back to top
View user's profile Send private message
weejai

New User


Joined: 17 May 2010
Posts: 7
Location: Detroit

PostPosted: Thu May 20, 2010 7:13 pm    Post subject: Reply to: create a new output file from difeirent columns of
Reply with quote

i tried executing the code but its abending with syntax errors.please suggest me if anyone has any idea why its happening
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu May 20, 2010 7:19 pm    Post subject: Re: Reply to: create a new output file from difeirent column
Reply with quote

weejai wrote:
please suggest me if anyone has any idea why its happening
Well, idea is simple, your shop is using "SYNCSORT FOR Z/OS 1.3.0.3R" in which WHEN=GROUP subparameter is not supported.

Aside: There is one way round, kolusu has shown you a way, those line of codes works on some logic - try to understand that logic and try to extend that to your version of SyncSort.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu May 20, 2010 9:20 pm    Post subject:
Reply with quote

Hello,

Suggest you talk with your manager and/or the system support people and learn when the current release of Syncsort might be available.

If this is not quite soon, you may want to consider writing the code . . .
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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 22 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 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


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