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 

JCL With a break key

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Roke
Beginner


Joined: 24 Feb 2005
Posts: 8
Topics: 3

PostPosted: Fri Apr 01, 2005 10:18 am    Post subject: JCL With a break key Reply with quote

Hi,
Im a novice of jcls, i want to know if is possible to do a jcl that do a sum of one variable in data set that its comp. I need to do this sum for al key so i need a break key.

Example:

In Data Set:
Code:

  000111122222
  000111133333
  000222255555
  000222255555

The result of this data set will be:
Code:

  000111155555
  002222100000

Thanks for all minds Smile
Back to top
View user's profile Send private message
Roke
Beginner


Joined: 24 Feb 2005
Posts: 8
Topics: 3

PostPosted: Fri Apr 01, 2005 11:00 am    Post subject: Reply with quote

Sorry the result will be :

000111155555
002222111110

The second variable that are after ones and twos are the variables that you have to sum.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Apr 01, 2005 11:15 am    Post subject: Reply with quote

If the 22222, 33333, 55555 and 55555 values are COMP, then they're the equivalent of 4-byte BI values as far as DFSORT is concerned (e.g. 2222 = X'000008AE'), so you can use a job like the following to get what you want. I'm assuming that your key in bytes 1-7 is CH format, but if not just change the SORT statement appropriately.

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN DD *
   SORT FIELDS=(1,7,CH,A)
   SUM FIELDS=(8,4,BI)


For more on the DFSORT equivalents of COBOL data types, see the "What are the equivalent DFSORT formats for various COBOL data types?" Ask Professor Sort item at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest going through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access this book, and all of the other DFSORT books, at:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort


Last edited by Frank Yaeger on Fri Aug 25, 2006 6:15 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roke
Beginner


Joined: 24 Feb 2005
Posts: 8
Topics: 3

PostPosted: Fri Apr 01, 2005 12:47 pm    Post subject: Reply with quote

I have another question for all of you, anyone can tell me where i can find a simple manual for do simple reports?
If a have a data set with 100 register and i want to print all registers how can i do??
for example:

John23
Mark24

I want to print that

Nam || Age
John 23
Mark 24

Thanks for all minds
Back to top
View user's profile Send private message
Roke
Beginner


Joined: 24 Feb 2005
Posts: 8
Topics: 3

PostPosted: Fri Apr 01, 2005 12:56 pm    Post subject: Reply with quote

Another question, if u want to print a PIC S9(4) USAGE COMP. and a
PIC S9(15)V9(2) USAGE COMP-3. whats the format?
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Apr 01, 2005 1:35 pm    Post subject: Reply with quote

You can use the DISPLAY operator of DFSORT's ICETOOL to do simple (and not so simple reports). For complete details on DFSORT's ICETOOL, see Chapter 6 of "z/OS DFSORT Application Programming Guide". You can access it from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

An example of a DFSORT/ICETOOL job for a simple report would be:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
John      23
Mark      24
/*
//RPT DD SYSOUT=*
//TOOLIN DD *
  DISPLAY FROM(IN) LIST(RPT) BLANK -
   HEADER('Name') ON(1,10,CH) -
   HEADER('Age') ON(11,2,ZD)
/*


RPT would have:

Code:

Name         Age 
----------   --- 
John          23 
Mark          24 

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Apr 01, 2005 1:45 pm    Post subject: Reply with quote

Quote:
Another question, if u want to print a PIC S9(4) USAGE COMP. and a
PIC S9(15)V9(2) USAGE COMP-3. whats the format?


Look at the link I gave you for the DFSORT equivalents of COBOL data types in my previous post. It shows that PIC S9(4) USAGE COMP is a 2-byte FI field and PIC S9(15)V9(2) USAGE COMP-3 is a 9-byte PD field.

If you want to print those as decimal values, you can use DFSORT/ICETOOL DISPLAY ON fields like this: ON(x,2,FI) ON(y,9,PD) where x and y are the starting positions of the respective fields. Note that you'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) to handle the 9-byte PD field. You can also do some editing on the output fields (e.g. add a decimal point) using the ON field formatting capabilities of DISPLAY as described in the DFSORT book.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
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 -> Job Control Language(JCL) 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