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
 

 

justification with edit mask?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rss0213

New User


Joined: 20 Jan 2010
Posts: 26
Location: Alabama

PostPosted: Sat Jul 28, 2012 7:33 pm    Post subject: justification with edit mask?
Reply with quote

Hi. I have an easy one (I hope)... I'm using SORT to build email notification cards from a control totals file. In my OUTREC BUILD statement, I'm trying to left justify input fields that also had a custom edit mask applied. So I coded the following:

Code:
 OPTION COPY
 OUTFIL BUILD=(1:C'HELO MYEMAILSERVER.COM',/,
...
 C'--SIMPLE BOUNDARY',/,
 C'CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"',2/,
 C'   DEPOSIT CUT: ',18:4,2,/,
 C' DEPOSIT COUNT: ',18:13,7,ZD,EDIT=(IIIIIIT),
   JFY=(SHIFT=LEFT),/,
 C'DEPOSIT AMOUNT: ',18:20,10,ZD,EDIT=($II,III,IIT.TT),
   JFY=(SHIFT=LEFT),/,
 C'--SIMPLE BOUNDARY',2/)


But I get a syntax error:

Code:
            C'CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"',2/,
            C'   DEPOSIT CUT: ',18:4,2,/,
            C' DEPOSIT COUNT: ',18:13,7,ZD,EDIT=(IIIIIIT),
              JFY=(SHIFT=LEFT),/,
              $
ICE007A E SYNTAX ERROR


Any ideas why I'm getting this? If I don't apply the justification, the output is accurate, but it doesn't line up:

Code:
CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"

   DEPOSIT CUT:  10
 DEPOSIT COUNT:        5
DEPOSIT AMOUNT:     $971,159.40


I want it to look like this:


Code:
CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"

   DEPOSIT CUT:  10
 DEPOSIT COUNT:  5
DEPOSIT AMOUNT:  $971,159.40
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Sat Jul 28, 2012 10:16 pm    Post subject:
Reply with quote

What version of DFSort are you using? That is - please show us the ICE201I message.
Back to top
View user's profile Send private message
rss0213

New User


Joined: 20 Jan 2010
Posts: 26
Location: Alabama

PostPosted: Sat Jul 28, 2012 10:26 pm    Post subject:
Reply with quote

Code:
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Jul 28, 2012 10:44 pm    Post subject:
Reply with quote

well, i only see syntax for
p,m,justify
%nn,justify

but none for
edit,justify

but, i can't play on a machine and determine
if i have interpreted that SYNTAX diagrams on this page correctly.
Back to top
View user's profile Send private message
rss0213

New User


Joined: 20 Jan 2010
Posts: 26
Location: Alabama

PostPosted: Sat Jul 28, 2012 10:54 pm    Post subject:
Reply with quote

Hi Dick. In the manuals it wasn't clear to me if DFSORT is capable of doing both either (edit and justify).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Jul 28, 2012 10:58 pm    Post subject:
Reply with quote

i found this example while searching:
Code:
  OPTION COPY                                   
  INREC BUILD=(1,03,4,5,ZD,EDIT=(IIIII),09,3)   
  OUTREC BUILD=(1,11,SQZ=(SHIFT=LEFT))           


edit during the INREC
sqz or jfy on the outrec.

squeeze has the same syntax rules as jfy

p,m
%nn
Back to top
View user's profile Send private message
rss0213

New User


Joined: 20 Jan 2010
Posts: 26
Location: Alabama

PostPosted: Sat Jul 28, 2012 11:57 pm    Post subject:
Reply with quote

One difference: I'm building multiple out records from one input record. According to the manual, I need to use the the BUILD operation of OUTFIL - not OUTREC. So here's the solution...

Input: A single-record file with a value that tells me who needs to receive the email in first three bytes. Also contains confirmation totals:

Code:
BBB10000000600000050097115940


DFSORT Statements:

Code:
OPTION COPY
INREC  IFTHEN=(WHEN=(1,3,CH,EQ,C'AAA'),
         BUILD=(1:1,12,
               13:13,07,ZD,EDIT=(I,III,IIT),   *** apply edit masking to count
               22:20,10,ZD,EDIT=($II,III,IIT.TT),   *** edit masking for amount
               36:C'AAA@MYSERVER.COM')),
       IFTHEN=(WHEN=(1,3,CH,EQ,C'BBB'),
         BUILD=(1:1,12,
               13:13,07,ZD,EDIT=(I,III,IIT),
               22:20,10,ZD,EDIT=($II,III,IIT.TT),
               36:C'BBB@AAA@MYSERVER.COM')),
       IFTHEN=(WHEN=(1,3,CH,EQ,C'CCC'),
         BUILD=(1:1,12,
               13:13,07,ZD,EDIT=(I,III,IIT),
               22:20,10,ZD,EDIT=($II,III,IIT.TT),
               36:C'CCC@AAA@MYSERVER.COM')),
       IFTHEN=(WHEN=(1,3,CH,EQ,C'DDD'),
         BUILD=(1:1,12,
               13:13,07,ZD,EDIT=(I,III,IIT),
               22:20,10,ZD,EDIT=($II,III,IIT.TT),
               36:C'DDD@AAA@MYSERVER.COM')),
       IFTHEN=(WHEN=(1,3,CH,EQ,C'EEE'),
         BUILD=(1:1,12,
               13:13,07,ZD,EDIT=(I,III,IIT),
               22:20,10,ZD,EDIT=($II,III,IIT.TT),
               36:C'EEE@AAA@MYSERVER.COM'))
OUTFIL BUILD=(1:C'HELO AAA@MYSERVER.COM',/,
  C'MAIL FROM:<ME@AAA@MYSERVER.COM>',/,
  C'RCPT TO:<',10:36,29,/,             ** last field in record after INREC operation
  C'DATA',/,
  C'FROM: MY DEPARTMENT',/,
  C'TO: ',5:1,3,8:C' THEIR DEPARTMENT',/,
  C'SUBJECT:DEPOSITS CONFIRMATION',/,
  C'MIME-VERSION: 1.0',/,
  C'CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"',/,
  C'--SIMPLE BOUNDARY',/,
  C'CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"',2/,
  C'   DEPOSIT CUT: ',18:4,2,/,
  C' DEPOSIT COUNT: ',18:13,9,JFY=(SHIFT=LEFT),/,   *** left justify count
  C'  TOTAL AMOUNT: ',18:22,14,JFY=(SHIFT=LEFT),/,   *** left justify amount
  C'--SIMPLE BOUNDARY',2/)


Output (Email cards to be gener'd to SMTP output class for email):

Code:
HELO MYSERVER.COM
MAIL FROM:<ME@MYSERVER.COM>
RCPT TO:<BBB@MYSERVER.COM
DATA
FROM: MY DEPARTMENT
TO: THEIR DEPARTMENT
SUBJECT: DEPOSITS CONFIRMATION
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"

   DEPOSIT CUT:  10
 DEPOSIT COUNT:  5
DEPOSIT AMOUNT:  $971,159.40
--SIMPLE BOUNDARY
Back to top
View user's profile Send private message
rss0213

New User


Joined: 20 Jan 2010
Posts: 26
Location: Alabama

PostPosted: Sun Jul 29, 2012 12:00 am    Post subject:
Reply with quote

Oh, and I had to substitute a different recipient value for the AAA, BBB, etc. That's why I had so many IFTHEN statements...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Jul 29, 2012 12:09 am    Post subject:
Reply with quote

Scott,
thx for getting back to us.
glad you were successful.

Kolusu will drop by sometime monday and verify if indeed
sqz and jfy cannot follow edit
Back to top
View user's profile Send private message
knickraj
Warnings : 1

New User


Joined: 11 Jun 2007
Posts: 50
Location: Euro

PostPosted: Sun Jul 29, 2012 2:07 pm    Post subject:
Reply with quote

rss0213,

if I have read correctly your sort card.
you have only recepient value as variable on position 36

Code:
36:C'BBB@AAA@MYSERVER.COM'


instead of mutiple build you can use one build and use several ifthen overlay
at postion 36.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Sun Jul 29, 2012 3:43 pm    Post subject: Reply to: justification with edit mask?
Reply with quote

Good thought knickraj.

Scott,

Perhaps you can look at CHANGE to do the 3-character code to the mail reference.

Perhaps you can do all the first part with one OVERLAY - are those values in 1,3 fully inclusive?

Yes, if you want to write multiple records with the / (slash operator) you have to do that on OUTFIL.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Mon Jul 30, 2012 10:00 pm    Post subject: Reply to: justification with edit mask?
Reply with quote

rss0213,

Your control cards can be simplified. The edit mask is the same for all the codes. You just have to overlay differently for the email address.

You can use the LEAD and TRAIL parms to generate the text you want while justifying the numeric fields.

Use the following control cards.
Code:

//SYSIN    DD *                                                     
  OPTION COPY                                                       
  INREC IFTHEN=(WHEN=INIT,                                         
  BUILD=(01,12,13,07,ZD,EDIT=(I,III,IIT),                           
         20,10,ZD,EDIT=($II,III,IIT.TT))),                         
                                                                   
  IFTHEN=(WHEN=(1,3,CH,EQ,C'AAA'),                                 
  OVERLAY=(36:C'AAA@MYSERVER.COM')),                               
  IFTHEN=(WHEN=(1,3,CH,EQ,C'BBB'),                                 
  OVERLAY=(36:C'BBB@AAA@MYSERVER.COM')),                           
  IFTHEN=(WHEN=(1,3,CH,EQ,C'CCC'),                                 
  OVERLAY=(36:C'CCC@AAA@MYSERVER.COM')),                           
  IFTHEN=(WHEN=(1,3,CH,EQ,C'DDD'),                                 
  OVERLAY=(36:C'DDD@AAA@MYSERVER.COM')),                           
  IFTHEN=(WHEN=(1,3,CH,EQ,C'DDD'),                                 
  OVERLAY=(36:C'DDD@AAA@MYSERVER.COM')),                           
  IFTHEN=(WHEN=(1,3,CH,EQ,C'EEE'),                                 
  OVERLAY=(36:C'LONGEMAILADDRESSFORMAILIN.COM'))                   
                                                                   
  OUTFIL BUILD=(1:C'HELO AAA@MYSERVER.COM',/,                       
    C'MAIL FROM:<ME@AAA@MYSERVER.COM>',/,                           
    C'RCPT TO:<',10:36,29,/,                                       
    C'DATA',/,                                                     
    C'FROM: MY DEPARTMENT',/,                                       
    C'TO: ',5:1,3,8:C' THEIR DEPARTMENT',/,                         
    C'SUBJECT:DEPOSITS CONFIRMATION',/,                             
    C'MIME-VERSION: 1.0',/,                                         
    C'CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"',/,
    C'--SIMPLE BOUNDARY',/,                                         
    C'CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"',2/,             
    C'   DEPOSIT CUT: ',4,2,/,                                     
    13,09,JFY=(SHIFT=LEFT,LENGTH=32,LEAD=C' DEPOSIT COUNT: '),/,   
    22,14,JFY=(SHIFT=LEFT,LENGTH=32,LEAD=C'  TOTAL AMOUNT: '),/,   
    C'--SIMPLE BOUNDARY',2/)                                       
//*
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Use of Edit & FTOV migusd SYNCSORT 3 Wed Jun 08, 2016 1:49 am
No new posts How storage is calculated for AN-Edit... Raghu navaikulam COBOL Programming 2 Wed Mar 09, 2016 3:51 pm
No new posts Too many edit macro's and too few PF ... don.leahy TSO/ISPF 7 Wed Feb 17, 2016 3:00 am
No new posts EDIT END(SAVE) or CANCEL? Steve Coalbran TSO/ISPF 9 Sat Feb 06, 2016 7:11 pm
No new posts How to create/edit/update a new GDG V... karthikbalakumar8 JCL & VSAM 2 Fri Feb 05, 2016 6:35 pm


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