Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Initiliza a few fields of a Vsam using sort

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

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Fri Feb 09, 2007 1:11 pm    Post subject: Initiliza a few fields of a Vsam using sort
Reply with quote

I have a requirement to intilize two fileds CHAR, nad PACKED DECIMAL.
Would someone please assist on this..
Back to top
View user's profile Send private message

manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Fri Feb 09, 2007 2:06 pm    Post subject:
Reply with quote

Hi,

can u give in brief what ur actual requirment was.

Regards,
Mani
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Fri Feb 09, 2007 5:31 pm    Post subject:
Reply with quote

My requirement is I have added 2 new fields x(02) and S9(03)v99 comp-3. I will ahve to intilize all these fields using a quick batch program, probable using SORT statements.

So I want those sort statements..and sytex if possable
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Feb 09, 2007 10:01 pm    Post subject:
Reply with quote

Initialize to what? What is the starting position of each field? Are the VSAM record fixed length or variable length?
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Tue Feb 13, 2007 4:46 pm    Post subject:
Reply with quote

It's a variable length VSAM.

Starting position of field 1 = 452, length = 2, PIC X(02)
Startign position of field 2 = 454, length = 3, PIC S999v99 comp-3

And Condition is (starting position = 39, length = 2, PIC X(02)) = '10'

The above two fields Occurs 5 times

Thanks..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Feb 13, 2007 9:58 pm    Post subject:
Reply with quote

It's still not clear what you want to do which makes it difficult to help you.

What is the "condition" used for? Do you only want to initialize fields in records with that condition, or do you want to use the condition for something else.

You still haven't told us what values you want to use to initialize field1 and field2. Do you want to initialize field1 to '00' or spaces or what? Do you want to initialize field2 to PD 0 or something else?

What do you mean by "the above two fields occurs 5 times"? Do field1 and field2 occur 5 times in each record starting at position 452 or what?
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Tue Feb 13, 2007 10:24 pm    Post subject:
Reply with quote

Please find below my answers

It's a variable length VSAM.

Starting position of field 1 = 452, length = 2, PIC X(02)
Wanted to initialize to SPACES
Startign position of field 2 = 454, length = 3, PIC S999v99 comp-3
Wanted to initialize to ZEROS
And Condition is (starting position = 39, length = 2, PIC X(02)) = '10'
Only I wanted to initialize the fields of a particular records which meets the condition above.
The above two fields Occurs 5 times
Above two fields comes under one group which occurs 5 times.

One more quistion..I haven't added 4 bytes to starting positions, scince this is VSAM file, I doubt we may need to add 4 to starting position.

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: Tue Feb 13, 2007 10:47 pm    Post subject:
Reply with quote

Hello,

Please post some real data that currently exists and show what you want the result to look like. You need to specify the starting position of each of the fields you want to initialize - all 10 of them.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Feb 13, 2007 11:34 pm    Post subject:
Reply with quote

rkprasanth_m,

If I understand correctly what you want to do, then this DFSORT job will do what you asked for. Since this is a variable-length VSAM file, you must add +4 to the starting positions and specify TYPE=V.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VSAM V)
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  RECORD TYPE=V
  OPTION COPY
  INREC IFTHEN=(WHEN=(43,2,CH,EQ,C'10'),
    OVERLAY=(456:5X'404000000C'))
/*
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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us