Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-16 Thread Rob van der Heij
On Nov 15, 2007 10:51 PM,  [EMAIL PROTECTED] wrote:

 great - i got that to work in my PIPE.
 thanks for the direction.

The arithmetic in SPEC is somewhat designed after the IBM 407
Accounting Machine. You will fine a few references to that in The Book
(the CMS/TSO Pipelines: Author's Edition - download the 2007
revision from http://vm.marist.edu/~pipeline )

With pipe help specref you do get the same text online, but it is
not the best way to start learning it there. I would rather use it as
a reference when you know most of it already.

Rob


Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread Kris Buelens
The silence here probably means the audience is not familiar with COBOL
program where the field is 9(7).9(7).  Anyhow, I don't underdstand.
I can say however that in your specs you have two things that are not
required, hence pure overhead:  PAD BLANK is default  and when padding is
with blanks, there is no need to code things like /  / 105 (unless the
data you placed previously could have placed something else in column 105 
106).

2007/11/15, [EMAIL PROTECTED] [EMAIL PROTECTED]:


 i am using pipelines to reformat a DB data dump file that has vertical
 bars as field separators.

 one of the fields is a dollar amount which can take any of these formats:
 0
 1
 12
 123.4
 1234.56

 i want to reformat this as input for a COBOL program where the field is
 9(7).9(7)

 can i do this in the specs stage ?
 or do i have to pass the records thru and format this particular field
 and then use my specs stage to put all the fields into the right columns?

 here is the current coding i have:
 'PIPE',
   ' CABSEAST DATA B',/* read the oracle dump file */
   '| drop 1', /* skip the first line - header data */
   '| SPECS pad blank fs 4F ', /* fields separated by '|' character */
   'field 1 1 left',   /* field  1 will go into col  1  */
   'field 2 9 left',   /* field  2 will go into col  9  */

 ... etc.

   'field 17 104 left',/* field 17 will go into col 103 */
   '/  / 105', /* put two blanks in 105-106 */
   'pad 0 field 18 107-120 right', /* field 18 is numeric - right align */
   '/ / 121',  /* insert a blank*/
   'pad blank field 19 122 left',  /* field 19 will go into col 122 */
   'field 20 124 left',/* field 20 will go into col 124 */

 ... etc.

 field 18 is the one that needs to be reformatted.


 prg

 Phillip Gramly
 Systems Programmer
 Communications Data Group
 Champaign, IL




-- 
Kris Buelens,
IBM Belgium, VM customer support


Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread Rob van der Heij
On Nov 15, 2007 10:52 AM, Kris Buelens [EMAIL PROTECTED] wrote:

 The silence here probably means the audience is not familiar with COBOL
 program where the field is 9(7).9(7).  Anyhow, I don't underdstand.

It certainly explains my lack of response ;-)   I suppose the poster
should look at the picture in specs for it, but without knowing
what that format does, I may be sending him there without a reason.

 I can say however that in your specs you have two things that are not
 required, hence pure overhead:  PAD BLANK is default  and when padding is
 with blanks, there is no need to code things like /  / 105 (unless the
 data you placed previously could have placed something else in column 105 
 106).

I would certainly consider a topology of the pipeline that requires
less typing (and re-typing when something changes). For starters,
split the records on the | and match them against a table to arrange
justifying and/or padding. If nothing else, one could even generate
the pipeline out of such a table.

Rob


Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread Graves Nora E
I can answer the COBOL part, anyway. :-)
 
He needs a resulting field that will appear this way for each example:
0 00
1 001000
12012000
123.4 123400
1234.56   0001234560
 
 
Nora Graves
[EMAIL PROTECTED]
Main IRS, Room 6513
(202) 622-6735 
Fax (202) 622-3123
 



From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Kris Buelens
Sent: Thursday, November 15, 2007 4:53 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: CMS Pipelins - can SPEC reformat a field with decimal


The silence here probably means the audience is not familiar with COBOL
program where the field is 9(7).9(7).  Anyhow, I don't underdstand. 
I can say however that in your specs you have two things that are not
required, hence pure overhead:  PAD BLANK is default  and when padding
is with blanks, there is no need to code things like /  / 105 (unless
the data you placed previously could have placed something else in
column 105  106). 


2007/11/15, [EMAIL PROTECTED] [EMAIL PROTECTED]: 


i am using pipelines to reformat a DB data dump file that has
vertical bars as field separators. 

one of the fields is a dollar amount which can take any of these
formats: 
0 
1 
12 
123.4 
1234.56 

i want to reformat this as input for a COBOL program where the
field is 
9(7).9(7) 

can i do this in the specs stage ? 
or do i have to pass the records thru and format this particular
field 
and then use my specs stage to put all the fields into the right
columns? 

here is the current coding i have: 
'PIPE', 
  ' CABSEAST DATA B',/* read the oracle dump file
*/ 
  '| drop 1', /* skip the first line -
header data */ 
  '| SPECS pad blank fs 4F ', /* fields separated by '|'
character */ 
  'field 1 1 left',   /* field  1 will go into col
1  */ 
  'field 2 9 left',   /* field  2 will go into col
9  */ 

... etc. 

  'field 17 104 left',/* field 17 will go into col
103 */ 
  '/  / 105', /* put two blanks in 105-106
*/ 
  'pad 0 field 18 107-120 right', /* field 18 is numeric - right
align */ 
  '/ / 121',  /* insert a blank
*/ 
  'pad blank field 19 122 left',  /* field 19 will go into col
122 */ 
  'field 20 124 left',/* field 20 will go into col
124 */ 

... etc. 

field 18 is the one that needs to be reformatted. 


prg

Phillip Gramly
Systems Programmer
Communications Data Group
Champaign, IL




-- 
Kris Buelens,
IBM Belgium, VM customer support 


Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread Rob van der Heij
On Nov 15, 2007 2:35 PM, Graves Nora E [EMAIL PROTECTED] wrote:

 I can answer the COBOL part, anyway. :-)

 He needs a resulting field that will appear this way for each example:
 0 00
 1 001000
 12012000
 123.4 123400
 1234.56   0001234560

In that case, I suppose this should do

  | spec a: w1 - print a pic 999.999 1 | change /.//

Rob


Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread Kris Buelens
Now it is a piece of cake:
 PIPE Literal ||1234.56||
 | Specs FS ||  a: F2 . Print a*1000 PIC 99 1
 | cons

2007/11/15, Graves Nora E [EMAIL PROTECTED]:

  I can answer the COBOL part, anyway. :-)

 He needs a resulting field that will appear this way for each example:
 0 00
 1 001000
 12012000
 123.4 123400
 1234.56   0001234560


 Nora Graves
 [EMAIL PROTECTED]
 Main IRS, Room 6513
 (202) 622-6735
 Fax (202) 622-3123


  --
 *From:* The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Kris Buelens
 *Sent:* Thursday, November 15, 2007 4:53 AM
 *To:* IBMVM@LISTSERV.UARK.EDU
 *Subject:* Re: CMS Pipelins - can SPEC reformat a field with decimal

 The silence here probably means the audience is not familiar with COBOL
 program where the field is 9(7).9(7).  Anyhow, I don't underdstand.
 I can say however that in your specs you have two things that are not
 required, hence pure overhead:  PAD BLANK is default  and when padding is
 with blanks, there is no need to code things like /  / 105 (unless the
 data you placed previously could have placed something else in column 105 
 106).

 2007/11/15, [EMAIL PROTECTED] [EMAIL PROTECTED]:
 
 
  i am using pipelines to reformat a DB data dump file that has vertical
  bars as field separators.
 
  one of the fields is a dollar amount which can take any of these
  formats:
  0
  1
  12
  123.4
  1234.56
 
  i want to reformat this as input for a COBOL program where the field is
  9(7).9(7)
 
  can i do this in the specs stage ?
  or do i have to pass the records thru and format this particular field
  and then use my specs stage to put all the fields into the right
  columns?
 
  here is the current coding i have:
  'PIPE',
' CABSEAST DATA B',/* read the oracle dump file
  */
'| drop 1', /* skip the first line - header data
  */
'| SPECS pad blank fs 4F ', /* fields separated by '|' character
  */
'field 1 1 left',   /* field  1 will go into col  1
   */
'field 2 9 left',   /* field  2 will go into col  9
   */
 
  ... etc.
 
'field 17 104 left',/* field 17 will go into col 103
  */
'/  / 105', /* put two blanks in 105-106
  */
'pad 0 field 18 107-120 right', /* field 18 is numeric - right align
  */
'/ / 121',  /* insert a blank
   */
'pad blank field 19 122 left',  /* field 19 will go into col 122
  */
'field 20 124 left',/* field 20 will go into col 124
  */
 
  ... etc.
 
  field 18 is the one that needs to be reformatted.
 
 
  prg
 
  Phillip Gramly
  Systems Programmer
  Communications Data Group
  Champaign, IL





Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread Dave Jones
Phil, the best source of current PUIPE documentation is the so-called 
Author's Edition of the documentation. You can find a current copy here:

 http://vm.marist.edu/~pipeline/

Look for the section entitled CMS/TSO Pipelines Author's Edition.

Good luck.

[EMAIL PROTECTED] wrote:

yes, nora is correct - that is the manipulation that i need.

i have used PIPEs to convert all the | to ¦ to help in reading the 
pipeline


i understand the literal stage, but the SPECS seems to not be complete 
with a stage separator  before it is complete.

should it be:
| SPECS FS ¦ Field 2 | a:etc. 


also, i don't find anything in the manual about 'print a*'
can you explain that part of the pipe?


Now it is a piece of cake:
 PIPE Literal ||1234.56|| 
 | Specs FS ||  a: F2 . Print a*1000 PIC 99 1

 | cons

2007/11/15, Graves Nora E  [EMAIL PROTECTED]:
I can answer the COBOL part, anyway. :-)
 
He needs a resulting field that will appear this way for each example:

0 00
1 001000
12012000
123.4 123400
1234.56   0001234560


prg

Phillip Gramly
Systems Programmer
Communications Data Group
Champaign, IL


--
DJ
V/Soft


Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread phillip
yes, nora is correct - that is the manipulation that i need.

i have used PIPEs to convert all the | to ¦ to help in reading the 
pipeline

i understand the literal stage, but the SPECS seems to not be complete 
with a stage separator  before it is complete.
should it be:
| SPECS FS ¦ Field 2 | a:etc. 

also, i don't find anything in the manual about 'print a*'
can you explain that part of the pipe?



Now it is a piece of cake:
 PIPE Literal ||1234.56|| 
 | Specs FS ||  a: F2 . Print a*1000 PIC 99 1
 | cons

2007/11/15, Graves Nora E  [EMAIL PROTECTED]:
I can answer the COBOL part, anyway. :-)
 
He needs a resulting field that will appear this way for each example:
0 00
1 001000
12012000
123.4 123400
1234.56   0001234560



prg

Phillip Gramly
Systems Programmer
Communications Data Group
Champaign, IL

Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread Kris Buelens
You can issue PIPE AHELP SPECTUT and PIPE AHELP SPECREF for a tutorial and
the SPECS reference.

A little changed pipe:
PIPE (sep !) Literal |1234.56|
! Specs FS |  a: F2 . Print a*1000 PIC 99 1
! cons

And, as you seem brandnew in 407:
   a: F2 . 
means assign symbol a to field 2, but don't place field 2 in the the
output record.
Print is to store a symbol, counter calculation, ... in the output record,
here we store field 2 in column 1, after a multiplication.

2007/11/15, Rich Greenberg [EMAIL PROTECTED]:

 On: Thu, Nov 15, 2007 at 02:43:03PM -0600,[EMAIL PROTECTED] Wrote:

 } also, i don't find anything in the manual about 'print a*'
 } can you explain that part of the pipe?

 Phil,
 Look for 407 emulation, probably in the Authors help.

 --
 Rich Greenberg  N Ft Myers, FL, USA richgr atsign panix.com  + 1 239 543
 1353
 Eastern time.  N6LRT  I speak for myself  my dogs only.VM'er since
 CP-67
 Canines:Val, Red, Shasta  Casey (RIP), Red  Zero,
 Siberians  Owner:Chinook-L
 Retired at the beach Asst
 Owner:Sibernet-L




-- 
Kris Buelens,
IBM Belgium, VM customer support


Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread Rich Greenberg
On: Thu, Nov 15, 2007 at 02:43:03PM -0600,[EMAIL PROTECTED] Wrote:

} also, i don't find anything in the manual about 'print a*'
} can you explain that part of the pipe?

Phil,
Look for 407 emulation, probably in the Authors help.

-- 
Rich Greenberg  N Ft Myers, FL, USA richgr atsign panix.com  + 1 239 543 1353
Eastern time.  N6LRT  I speak for myself  my dogs only.VM'er since CP-67
Canines:Val, Red, Shasta  Casey (RIP), Red  Zero, Siberians  Owner:Chinook-L
Retired at the beach Asst Owner:Sibernet-L


Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread phillip
Rich,

are you refering to the Authors Edition? 
didn't find any references to 407 emulation.

or did you mean online help?

prg

Phillip Gramly
Systems Programmer
Communications Data Group
Champaign, IL

The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU wrote on 
11/15/2007 02:53:37 PM:

 On: Thu, Nov 15, 2007 at 02:43:03PM -0600,[EMAIL PROTECTED] Wrote:
 
 } also, i don't find anything in the manual about 'print a*'
 } can you explain that part of the pipe?
 
 Phil,
 Look for 407 emulation, probably in the Authors help.
 



Re: CMS Pipelins - can SPEC reformat a field with decimal

2007-11-15 Thread phillip
great - i got that to work in my PIPE. 
thanks for the direction.

prg

Phillip Gramly
Systems Programmer
Communications Data Group
Champaign, IL

The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU wrote on 
11/15/2007 03:08:40 PM:

 You can issue PIPE AHELP SPECTUT and PIPE AHELP SPECREF for a tutorial 
 and the SPECS reference.
 
 A little changed pipe:
 PIPE (sep !) Literal |1234.56| 
 ! Specs FS |  a: F2 . Print a*1000 PIC 99 1
 ! cons
 
 And, as you seem brandnew in 407:
a: F2 . 
 means assign symbol a to field 2, but don't place field 2 in the the 
 output record.
 Print is to store a symbol, counter calculation, ... in the output 
 record, here we store field 2 in column 1, after a multiplication. 

 2007/11/15, Rich Greenberg [EMAIL PROTECTED]:
 On: Thu, Nov 15, 2007 at 02:43:03PM -0600,[EMAIL PROTECTED] Wrote:
 
 } also, i don't find anything in the manual about 'print a*'
 } can you explain that part of the pipe? 
 
 Phil,
 Look for 407 emulation, probably in the Authors help.
 
 --
 Rich Greenberg  N Ft Myers, FL, USA richgr atsign panix.com  + 1 239 543 
1353
 Eastern time.  N6LRT  I speak for myself  my dogs only.VM'er since 
CP-67 
 Canines:Val, Red, Shasta  Casey (RIP), Red  Zero, Siberians 
Owner:Chinook-L
 Retired at the beach Asst 
Owner:Sibernet-L
 
 
 
 -- 
 Kris Buelens,
 IBM Belgium, VM customer support 

CMS Pipelins - can SPEC reformat a field with decimal

2007-11-14 Thread phillip
i am using pipelines to reformat a DB data dump file that has vertical 
bars as field separators.

one of the fields is a dollar amount which can take any of these formats:
0
1
12
123.4
1234.56

i want to reformat this as input for a COBOL program where the field is 
9(7).9(7)

can i do this in the specs stage ?
or do i have to pass the records thru and format this particular field 
and then use my specs stage to put all the fields into the right columns?

here is the current coding i have:
'PIPE',
  ' CABSEAST DATA B',/* read the oracle dump file */
  '| drop 1', /* skip the first line - header data */
  '| SPECS pad blank fs 4F ', /* fields separated by '|' character */
  'field 1 1 left',   /* field  1 will go into col  1  */
  'field 2 9 left',   /* field  2 will go into col  9  */

... etc.

  'field 17 104 left',/* field 17 will go into col 103 */
  '/  / 105', /* put two blanks in 105-106 */
  'pad 0 field 18 107-120 right', /* field 18 is numeric - right align */
  '/ / 121',  /* insert a blank*/
  'pad blank field 19 122 left',  /* field 19 will go into col 122 */
  'field 20 124 left',/* field 20 will go into col 124 */

... etc.

field 18 is the one that needs to be reformatted.


prg

Phillip Gramly
Systems Programmer
Communications Data Group
Champaign, IL