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
 

 

ifthen statements

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

New User


Joined: 26 Feb 2007
Posts: 30
Location: chicago

PostPosted: Wed Jun 09, 2010 10:43 pm    Post subject: ifthen statements
Reply with quote

I'm trying to convert some huge data files to comma delimited display files
using Sort, What I'm finding is that I will process maybe 200,000 records and then get a Soc7.
In general what I'm doing is converting PD or BI fields using
something like this:
21:15,5,PD,EDIT=(STTTTTTT.TT),SIGNS=(-,)
it works until I get the Soc7


I had thought to put in edit checks on the numeric fields. I've found examples on this forum that are something like this:
IFTHEN=(WHEN=(4,5,ZD,NE,NUM),
OVERLAY=(4:C'00000'),HIT=NEXT),


So I was thinking something like
IFTHEN=(WHEN=(15,5,PD,NE,NUM),
OVERLAY=(21:C'00000000000'),HIT=NEXT),

and then
IFTHEN=(WHEN=(15,5,PD,EQ,NUM),
OVERLAY=(21:15,5,PD,EDIT=(STTTTTTT.TT),SIGNS=(-,))


I've played around with it a bit and searched for other examples in this forum but not having any luck getting it to work

thanks
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 09, 2010 11:12 pm    Post subject:
Reply with quote

Hello,

Suggest you post a few examples of the records that cause the 0c7 and how you want the output form these. Post a few "normal" records as well and the output you want from them.

These do not need to be full-width records - only enough to show what you want to do.

Suggest you use FB/80 for the experiment and change to the "real" values later. If the file has variable length data, mention this as well.
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 09, 2010 11:16 pm    Post subject: Reply to: ifthen statements
Reply with quote

steves,

DFSORT treats a 0, 2, 4, 6, 8, A, C, E and F in the sign bit as a positive sign, and 1, 3, 5, 7, 9, B and D as a negative sign. You'd need a bad digit (not 0-9) to get an S0C7. You can run VERIFY which will identify values with bad digits.

Check this link for detailed explanation of Verify Operand with examples

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/6.16
Back to top
View user's profile Send private message
steves

New User


Joined: 26 Feb 2007
Posts: 30
Location: chicago

PostPosted: Thu Jun 10, 2010 12:02 am    Post subject: Reply to: ifthen statements
Reply with quote

I'll try again, thanks
here's an example
in the screen print, the SORT processes the record starting with 618832 successfully and then abends with a S0C7 on the next record starting with 618833. There are 3 packed fields starting in column 15. If I isolate these and only include the field starting in column 15 for 5, it gets the Soc7 on record 618833. If my JCL sort only includes fields in columns 1 to 14 it completes successfully.

The data in these packed fields; 15 for 5, 20 for 5, 25 for 4 - all looks the same to me , so I don't understand why a SoC7
Code:
----+----1----+----2----+----3----+---
----+----F----+----F----+----F----+---
----+----1----+----2----+----3----+---
-------------------------------------
61883210005160..............1.....   
FFFFFFFFFFFFFF00100000000000F00000   
618832100051600000C0000C010C100000   
-------------------------------------
61883310108290..............1.....   
FFFFFFFFFFFFFF00100000000000F00000   
618833101082900000C0000C010C100000   
-------------------------------------
61883410007170..............1.....   
FFFFFFFFFFFFFF00100000000000F00000   
618834100071700000C0000C010C100000   
[/code]
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 12:30 am    Post subject:
Reply with quote

Hello,

It will probably help if the complete sysin is posted along with the jcl for this step.

I should have mentioned this earlier icon_redface.gif
Back to top
View user's profile Send private message
steves

New User


Joined: 26 Feb 2007
Posts: 30
Location: chicago

PostPosted: Thu Jun 10, 2010 1:01 am    Post subject: Reply to: ifthen statements
Reply with quote

HERE IS THE ORIGINAL JCL BEFORE I STARTED MESSING WITH IFTHEN. THIS PROCESSESS ABOUT 200k RECORDS BEFORE GETTING THE S0C7

Code:
//STEP01    EXEC PGM=SORT,REGION=4096K           
//*                                               
//SORTIN   DD DISP=SHR,DSN=SS90000.A05.PAYMENT   
//*                                               
//SORTOUT  DD DISP=(NEW,CATLG,CATLG),             
//            DSN=DS06008.SS90000.A05.PAYMENT,   
//            UNIT=DISK,                         
//            SPACE=(TRK,(4000,1000),RLSE),       
//            DCB=(RECFM=FB),                     
//            LRECL=64,BLKSIZE=6400               
//SYSIN     DD *                                 
 SORT  FIELDS=COPY                               
 OUTREC FIELDS=(1:1,6,                           
                C',',                             
                8:7,1,                           
                C',',                             
                10:8,2,                           
                C',',                             
                13:10,2,                                   
                C',',                                       
                16:12,2,                                   
                C',',                                       
                19:14,1,                                   
                C',',                                       
                21:15,5,PD,EDIT=(STTTTTTT.TT),SIGNS=(-,),   
                C',',                                       
                33:20,5,PD,EDIT=(STTTTTTT.TT),SIGNS=(-,),   
                C',',                                       
                45:25,4,PD,EDIT=(STTTTTT.TT),SIGNS=(-,),   
                C',',                                       
                56:29,1,                                   
                C',',                                       
                58:30,5)                                   
                                                           
//SYSOUT    DD SYSOUT=*
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 1:44 am    Post subject:
Reply with quote

Hello,

I'm not sure about the 0c7, but doesn't this:
Code:
 45:25,4,PD,EDIT=(STTTTTT.TT),SIGNS=(-,),
have one too many Ts?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 1:46 am    Post subject: Reply to: ifthen statements
Reply with quote

Follow-up. . .

What does the record immediately before the problem record look like?

d
Back to top
View user's profile Send private message
steves

New User


Joined: 26 Feb 2007
Posts: 30
Location: chicago

PostPosted: Thu Jun 10, 2010 1:55 am    Post subject: Reply to: ifthen statements
Reply with quote

1. yes, too many t's on the 3rd field definition
2. the data I posted shows the record right before the soc7 (618832) and the record that it abends on (618833) . The entire record is displayed
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 2:01 am    Post subject:
Reply with quote

Hello,

Quote:
the data I posted shows the record right before the soc7 (618832) and the record that it abends on (618833) . The entire record is displayed
Long week today. . . icon_redface.gif

Earlier, i knew that, but seemed to misplace it. . .

I've stepped on my hand more today than i care to diagnose. . .

If the extra T is removed, does the 0c7 still happen?
Back to top
View user's profile Send private message
steves

New User


Joined: 26 Feb 2007
Posts: 30
Location: chicago

PostPosted: Thu Jun 10, 2010 2:10 am    Post subject:
Reply with quote

it still gets the s0c7
if I remove the offending record, I get a soc7 on the next record, remove another, again, another soc7.

For this client , so far I've converted 3 other systems succesfully using Sort. One file had 27 million records and Sort was fine

For this system ( ie this set of input files) every file I've converted gets a soc7 after processing a number of records. I would assume that this system allowed users to enter bad data and the others didn't but I don't see the bad data. Futhermore, once it reaches the soc7 record, no matter how many downstream records I delete from the input record, it still abends at the same point, like its reached the number of records in can process, But its not getting a B37 space error and it doesn't matter if I change the file size
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Jun 10, 2010 3:18 am    Post subject:
Reply with quote

Have you tried the verify Kolusu suggested?

You kind of have to realize that it is unwise to ignore the advice of a member of the 'DFSORT Development Team (IBM)'.......
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 4:29 am    Post subject:
Reply with quote

Hello,

Have you tried verify? Unless the incorrect record has been identified, i suspect it will run with no errors.

You might talk with your tech support and see if you are running the current version/ptf level as well as any fixes that specifically address an incorrect 0c7 abend.
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 10, 2010 10:17 pm    Post subject:
Reply with quote

steves wrote:
it still gets the s0c7
if I remove the offending record, I get a soc7 on the next record, remove another, again, another soc7.


Steves,

I am not sure as to how you arrived at the magical number of the bad record, but I can tell you that is NOT the record of concern as the hex values you show are perfectly valid. Please run VERIFY which will point you to the right invalid record.
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 Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts Extracting Information from DD Statem... Charles Wolters All Other Mainframe Topics 7 Wed Apr 13, 2016 10:21 pm
No new posts Parsing JCL SET var=value statements prino CLIST & REXX 0 Sat Dec 26, 2015 4:41 am
No new posts DFSORT control statements in any order ? ronald masters DFSORT/ICETOOL 2 Tue Dec 15, 2015 11:22 pm
No new posts IFTHEN to reformat the matching and n... maki_psg SYNCSORT 6 Fri Sep 25, 2015 2:53 pm


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