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

DFSORT Outrec Formatting


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Wed Jun 20, 2012 7:26 pm
Reply with quote

Hi,

How I am going to retrofit the below lines to my above sort card:

Code:
  HEADER2=(/,5:'FRAUD CARD LIMIT CHANGES',45:'PAGE',PAGE,   
     72:DATE=(MD4-),2/,1:'  CARD NUMBER   ',18:'CODE',       
     24:'        DAILY LIMIT       ',                       
     50,'      MONTHLY LIMIT       '),   
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Jun 20, 2012 9:48 pm
Reply with quote

abhijit.nayak01 wrote:
Hi,
How I am going to retrofit the below lines to my above sort card:


abhijit.nayak01,

Is there an end to your "How I can Retrofit my 8 hour work assignments"? You don't even bother to look up the manuals for the errors you get. Had you looked up the message ICE078A you would have realized the problem with your job. You didn't. Someone had to point you to look up the error, when that is done , now you come back with yet another request.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading 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 it online, along with all of the other DFSORT books, from:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Wed Jun 20, 2012 10:28 pm
Reply with quote

Hi,
Sorry if iam wasting your time. I saw the vsam open error and I thought if it is working with one file then it should work with two same type of sortin files. Even the retrofit one I tried all the combinations after reading the manual but everytime.I got syntax error. But now I got idea which I will try tomorrow. Instead of writing to the old sort card I will write a new sort card only for header.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Jun 20, 2012 10:43 pm
Reply with quote

abhijit.nayak01 wrote:
Hi,
Sorry if iam wasting your time. I saw the vsam open error and I thought if it is working with one file then it should work with two same type of sortin files. Even the retrofit one I tried all the combinations after reading the manual but everytime.I got syntax error. But now I got idea which I will try tomorrow. Instead of writing to the old sort card I will write a new sort card only for header.


1. Did you look at what the syntax error is ?

It marked right underneath the Last line where you are supposed to have 50: you had 50,. And you had an extra comma at the end of last line.

Once you corrected them the syntax error is gone, however you another problem.

You are creating a 80 byte file and you want the header date to start in position 72 and you want the date in MM-DD-CCYY format which would occupy 10 bytes. Now that would account to a total of 81 bytes and since you are writing a report the output would have a carriage control character making the total lrecl to be 82.

Assuming you still want 80 byte file and no print control character change the outfil statement to the following. I changed the date to be at position 70 instead of 72.

Code:

  OUTFIL VTOF,BUILD=(5,80),REMOVECC,                       
  HEADER2=(/,5:'FRAUD CARD LIMIT CHANGES',45:'PAGE',PAGE,   
           70:DATE=(MD4-),2/,1:'  CARD NUMBER   ',18:'CODE',
           24:'        DAILY LIMIT       ',                 
           50:'      MONTHLY LIMIT       ')                 
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Thu Jun 21, 2012 7:12 pm
Reply with quote

hi Kolusu,

Thanks for the above update. But here I am trying to retrofit the above HEADER2 code to earlier sort card. But I am getting lots of syntax errom. Because I dont know where to retrofit.
Here I tried to put and remove comma wherever possible.

Code:
            SORT FIELDS=COPY                                                   
            INCLUDE COND=(5,1,CH,EQ,C'3',AND,25,4,SS,EQ,C'ATSB,ELS0,ELS1')     
                                                                               
            INREC IFTHEN=(WHEN=(25,4,SS,EQ,C'ATSB,ELS0'),                     
                   BUILD=(1,4,6,9,PD,M11,LENGTH=16,X,25,4,X,390,25,X,417,25,X,
                          84:X)),                                             
                  IFTHEN=(WHEN=(25,4,CH,EQ,C'ELS1'),                           
                   BUILD=(1,4,6,9,PD,M11,LENGTH=16,X,25,4,X,66,25,X,93,25,X,   
                          84:X))                                               
            HEADER2=(/,5:'FRAUD CARD LIMIT CHANGES',45:'PAGE',PAGE,           
            $                                                                 
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY   

70:DATE=(MD4-),2/,1:' CARD NUMBER ',18:'CODE',
$
ICE007A 0 SYNTAX ERROR
24:' DAILY LIMIT ',
$
ICE007A 0 SYNTAX ERROR
50:,' MONTHLY LIMIT ')
$
ICE007A 0 SYNTAX ERROR
OUTFIL VTOF,BUILD=(5,80)
ICE751I 0 C5-K62149 C6-K90026 C7-K58148 C8-K67572 E7-K70685
ICE052I 3 END OF DFSORT
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 Jun 21, 2012 7:55 pm
Reply with quote

Hello,

You do realize that the majority of your posts are questions/problems about DFSORT/ICETOOL. Going back over 3 years.

How long will you need others to do this work? You might be concerned that someday you'll have something urgent and there won't be someone available with the knowledge, time, and patience to do the work.

I strongly recommend that you spend time understanding the solutions you receive rather than just implementing them.
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Thu Jun 21, 2012 8:33 pm
Reply with quote

Hi Dick,

Thanks a lot for your concern. I always look to the documents first. But I dont have any answer on the points you mentioned. May be you are correct and I will try to implement from myself rather than asking.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Jun 21, 2012 9:48 pm
Reply with quote

abhijit.nayak01 wrote:
hi Kolusu,

Thanks for the above update. But here I am trying to retrofit the above HEADER2 code to earlier sort card. But I am getting lots of syntax errom. Because I dont know where to retrofit.
Here I tried to put and remove comma wherever possible.


Pay attention to at least what I post. Why would you add the header2 to INREC statement.? Did you read this

skolusu wrote:

Assuming you still want 80 byte file and no print control character change the outfil statement to the following. I changed the date to be at position 70 instead of 72.


You are pretty much spoon-fed in this topic and yet you come up with ways to mess it up. wow.
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 Jun 21, 2012 10:06 pm
Reply with quote

Hello,

Quote:
Thanks a lot for your concern. I always look to the documents first. But I dont have any answer on the points you mentioned. May be you are correct and I will try to implement from myself rather than asking.
You're welcome.

Most of us "helpers" want you (and most of the others as well) to learn and succeed icon_smile.gif

I didn't mean to imply that asking is wrong - it can be a fine thing! What i recommend is that these solutions be well understood by whoever receives them. If there is not an understanding of "how" it works, there is no building of knowledge to go forward with.

To learn more about how a particular solution works, read the manual for the parameters where there is a doubt and copy the solution to a test member and experiment with changing the code. If you use a test library and test data (maybe even inline) you have no risk of hurting anything.

Good Luck!
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Fri Jun 22, 2012 1:21 am
Reply with quote

Thanks. May be I will find time tomorrow to solve that. Kolusu please dont put any
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 -> DFSORT/ICETOOL Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts Need help on formatting a report DFSORT/ICETOOL 14
Search our Forums:

Back to Top