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

create a new output file from difeirent columns of input


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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: 8797
Location: Welsh Wales

PostPosted: Wed May 19, 2010 6:16 pm
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

Moderator Emeritus


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

PostPosted: Wed May 19, 2010 7:47 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Wed May 19, 2010 8:03 pm
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
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
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: 2146
Location: At my coffee table

PostPosted: Wed May 19, 2010 11:05 pm
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

Superior Member


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

PostPosted: Thu May 20, 2010 3:09 pm
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
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

Superior Member


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

PostPosted: Thu May 20, 2010 7:19 pm
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

Moderator Emeritus


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

PostPosted: Thu May 20, 2010 9:20 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 5
No new posts How to turn off 'ACTION' SDSF output ... TSO/ISPF 2
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
Search our Forums:

Back to Top