View previous topic :: View next topic
|
Author |
Message |
janaonline
New User
Joined: 13 Dec 2007 Posts: 11 Location: USA, California
|
|
|
|
Hi,
In my program, am using the the dataset for multiple entries. So the dataset is in 'MOD' 'REUSE'. The write format is not what i was expecting.
Please find the code below.
"ALLOC F(OUTDD1) NEW DSORG(PS) REC(F B) LR(80) BLK(27920)",
"SPACE(10,10) TRACKS DSNAME('"OUTDS"')"
"ALLOC F(OUTDD1) DA('"OUTDS"') MOD REUSE" ;
PUSH IN_DT
"EXECIO" 1 "DISKW OUTDD1"
"EXECIO" 0 "DISKW OUTDD1 (FINIS"
"FREE F(OUTDD1)"
IN_DT = UID' 'EXHH' 'EHH' 'EXPCN' 'EPCN' 'EXTMSTP' 'ETMSTP
The output of the above code will be like this.
USR001 11111 2222 3333 4444 55555 66666
USR002 11111 2222 3333 4444 55555 66666
USR003 11111 2222 3333 4444 55555 66666
But i want the program to write the record in different format. The sample format is shown below.
USR001
11111
2222
3333
4444
55555
66666
USR002
11111
2222
3333
4444
55555
66666
Please help me in solving this. Thanks for your time.
[/img] |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm not following what difference it makes how your output dataset is allocated. You need to initiate multiple writes, i.e.:
PUSH UID
"EXECIO 1 DISKW OUTDD1"
PUSH EXHH
"EXECIO 1 DISKW OUTDD1"
PUSH EHH
"EXECIO 1 DISKW OUTDD1"
PUSH EXPCN
"EXECIO 1 DISKW OUTDD1"
PUSH EPCN
"EXECIO 1 DISKW OUTDD1"
PUSH EXTMSTP
"EXECIO 1 DISKW OUTDD1"
PUSH ETMSTP
"EXECIO 1 DISKW OUTDD1"
...
or
QUEUE UID
QUEUE EXHH
QUEUE EHH
QUEUE EXPCN
QUEUE EPCN
QUEUE EXTMSTP
QUEUE ETMSTP
"EXECIO " QUEUED()" DISKW OUTDD1"
... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the output is consistent with Your coding
You queued a record built by string juxtaposition
if You want things in seperate records build each record accordingly |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
build each record accordingly
|
Each time you PUSH builds a new record. |
|
Back to top |
|
|
janaonline
New User
Joined: 13 Dec 2007 Posts: 11 Location: USA, California
|
|
|
|
Thanks for all your guidance. I solved the issue by multiple writes.. |
|
Back to top |
|
|
|