MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Report formatting

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Martin
Beginner


Joined: 20 Mar 2006
Posts: 133
Topics: 58

PostPosted: Tue Jan 13, 2009 1:27 pm    Post subject: Report formatting Reply with quote

Hi,

I have a report which needs to be formatted as per the below requirements.

Input file :
Code:

Member : XXXXXX
ABCD                    EEEEEEEEEEEEEEEEEEEEEEEE
                        HHHHHHHHHHHHHHHHHHHHH
                        BBBBBBBBBBBBBBBBB
PQRS                    YYYYYYYYYYYYYYYYYYYYYYYY
                        UUUUUUUUUUUUUUUUUUUUU

Member : OOOOOO
ABCD                      PPPPPPPPPPPPPPPPPPPPPPPP
                          QQQQQQQQQQQQQQQQQQQ
                          RRRRRRRRRRRRRRRRRRRRR
PQRS                      XXXXXXXXXXXXXXXXXXXXXX
                          LLLLLLLLLLLLLLLLLLLLLLLLLLLLL

Output file :
Code:

Member                          ABCD                                        PQRS
XXXXXXXX                    EEEEEEEEEEEEEEEEEEEEEEEE     YYYYYYYYYYYYYYYYYYYYYYYY
.
.
.
.
.


I/P FILE LENGTH IS 133


Thanks,
Martin
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jan 13, 2009 2:17 pm    Post subject: Reply with quote

Martin,

My crystal ball isn't that clear today. You need to do a better job of explaining the rules to club the records.

what is the criteria to move the records?
what is the position and length of the fields to be arranged.
Show us a complete input and desired output for few keys using CODE blocks.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Martin
Beginner


Joined: 20 Mar 2006
Posts: 133
Topics: 58

PostPosted: Tue Jan 13, 2009 4:20 pm    Post subject: Reply with quote

Sorry about that... Below is an example...

Input file is 133 bytes
ABCD/PQRS start from pos 1 length : 3-8 bytes
the codes associated with ABCD/PQRS start from pos 20 length 30-46

Output file requirements:
Output file is 133 length.
Member name / ABCD/PQRS will be the columns and we need to reformat the input to pull the assicated codes with ABCD/PQRS for every member mentioned in the input file


Code:


Member : XXXXXX
ABCD                 EEEEEEEEE
                     HHHHHHHH
                     BBBBBBBB
PQRS                YYYYYYYYY
                      UUUUUUU

Member : OOOOOO
ABCD                  PPPPPPPP
                      QQQQQQQQ
                      RRRRRRRRR

Member : PPPPPP

PQRS                XXXXXXXXX
                   LLLLLLLLLLLL
 

Output file :
Code:

Member                               ABCD                                   PQRS
XXXXXXXX                            EEEEEEEEEE                             YYYYYYYYY
                                    HHHHHH                                   UUUUUUU
                                    BBBBBBBB

OOOOOO                             PPPPPPPPP
                                    QQQQQQQ
                                    RRRRRRR

PPPPPPP                                                                       XXXXXXX
                                                                             LLLLLLLLL
               

Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jan 13, 2009 6:55 pm    Post subject: Reply with quote

Martin,

You can format using the new WHEN=GROUP function of DFSORT available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:
Code:

//STEP0100 EXEC PGM=ICEMAN   
//SYSOUT   DD SYSOUT=*       
//SORTIN   DD DSN=your 133 byte lrecl file,
//            DISP=SHR
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  OPTION EQUALS                                                     
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,8,CH,EQ,C'MEMBER :'),           
  PUSH=(134:10,8,ID=8)),                                             
  IFTHEN=(WHEN=GROUP,BEGIN=(1,8,CH,EQ,C'ABCD',OR,1,8,CH,EQ,C'PQRS'),
  PUSH=(150:1,8)),                                                   
  IFTHEN=(WHEN=(1,8,CH,EQ,C'MEMBER :'),OVERLAY=(150:8X)),           
  IFTHEN=(WHEN=(150,8,CH,EQ,C'ABCD'),                               
  OVERLAY=(158:SEQNUM,8,ZD,RESTART=(134,16),170:20,36,44Z)),         
  IFTHEN=(WHEN=(150,8,CH,EQ,C'PQRS'),                               
  OVERLAY=(158:SEQNUM,8,ZD,RESTART=(134,16),170:40Z,210:20,36,4Z))   
                                                                     
  SORT FIELDS=(142,8,CH,A,158,8,CH,A)                               
  SUM FIELDS=(210,8,218,8,226,8,234,8,242,8),FORMAT=BI               
                                                                     
  OUTREC IFTHEN=(WHEN=INIT,BUILD=(134,116)),                         
  IFTHEN=(WHEN=INIT,OVERLAY=(37:37,80,TRAN=ALTSEQ)),                 
  IFTHEN=(WHEN=(25,8,ZD,GT,1),OVERLAY=(01:8X))                       
  ALTSEQ CODE=(0040)                                                 
                                                                     
  OUTFIL REMOVECC,OMIT=(17,8,CH,EQ,C' '),                           
  BUILD=(1,8,X,37,40,77,40),                                         
  HEADER1=(01:C'MEMBER ',10:C'ABCD',50:C'PQRS')                     
//*


The output from this job is
Code:

MEMBER   ABCD                                    PQRS         
XXXXXX   EEEEEEEEE                               YYYYYYYYY   
         HHHHHHHH                                UUUUUUU     
         BBBBBBBB                                             
OOOOOO   PPPPPPPP                                             
         QQQQQQQQ                                             
         RRRRRRRRR                                           
PPPPPP                                           XXXXXXXXX   
                                                 LLLLLLLLLLLL
                                                             

If you don't have the July, 2008 PTF installed, ask your System Programmer to install it (it's free).

For complete details on the new WHEN=GROUP and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/

Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Martin
Beginner


Joined: 20 Mar 2006
Posts: 133
Topics: 58

PostPosted: Wed Jan 14, 2009 12:19 am    Post subject: Reply with quote

Hi Kolusu,

Thanks for the solution.We have SYNCSORT in our shop.... Sad

Any solutions using SYNCSORT?? Rolling Eyes
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Jan 14, 2009 11:40 am    Post subject: Reply with quote

Martin,

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.

Thanks
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Wed Jan 14, 2009 12:01 pm    Post subject: Reply with quote

Hello Martin.

Support for WHEN=GROUP is available in SyncSort for z/OS 1.3.2. If you are already licensed for SyncSort for z/OS, then this is a free upgrade. Please feel free to contact me offline, or contact SyncSort Mainframe Product Services if you are interested in upgrading your SyncSort release.

Best Regards,
_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
Martin
Beginner


Joined: 20 Mar 2006
Posts: 133
Topics: 58

PostPosted: Wed Jan 14, 2009 4:21 pm    Post subject: Reply with quote

Kolusu,

Thanks for the DFSORT solution..

Aliissa,

I have informed the concerned folks at my site and they should contact you soon. But Is there a way to achieve this using 1.3.1 version? Please let me know.

Thanks,
Martin
Back to top
View user's profile Send private message
Martin
Beginner


Joined: 20 Mar 2006
Posts: 133
Topics: 58

PostPosted: Fri Jan 16, 2009 12:07 pm    Post subject: Reply with quote

Allisa -Could you please look into this? Sad
Back to top
View user's profile Send private message
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Fri Jan 16, 2009 1:20 pm    Post subject: Reply with quote

Martin,

I'm tied up at the moment, I'll try to get to it when I have some down time...
_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
Martin
Beginner


Joined: 20 Mar 2006
Posts: 133
Topics: 58

PostPosted: Fri Jan 23, 2009 4:46 pm    Post subject: Reply with quote

Kolusu,

Is there a way to achieve this without "WHEN=GROUP" feature?

Please let me know

Thanks,
Martin
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Jan 23, 2009 4:55 pm    Post subject: Reply with quote

Martin,

If you are a DFSORT customer I would have shown you a way to do it without using WHEN=GROUP feature. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.

Thanks
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group