Odd write formats behaviour

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Odd write formats behaviour

David Millar

Dear All

 

I am trying to write test data to a text file and setting the write formats like this

 

write formats studentid (f7.0)/

    gender rform rv01 to rv36 rc001 to rc160 (a1)/

    wgt (f5.0).

 

When I run the syntax interactively it works fine.  When I run it via the production facility I get the following error message

 

Warning # 4837 on line 76 in column 5.  Text: Gender >The width of a string format must match the width of the string variable.  The >correct width has been substituted.

 

This is in spite of the fact that the variables are all a1 in the original system file from which they’re read.

 

Any thoughts?

 

Thanks

 

David

 

-------------------------------------------

 

Dr David Millar

Research Associate

Educational Research Centre

St Patrick's College

Dublin 9

 

Tel 01 8065226

Reply | Threaded
Open this post in threaded view
|

Re: Odd write formats behaviour

Jon K Peck
I suspect that something else in the job is causing this problem.  The most likely cause is that one session is running in code page mode and the other in Unicode mode, and reading the data in that mode from a code page source has caused the strings to be widened.

The other possibility is that you are running the production job specifying Batch syntax format, and you have some syntax that is not valid for that.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        David Millar <[hidden email]>
To:        [hidden email],
Date:        08/28/2013 05:42 AM
Subject:        [SPSSX-L] Odd write formats behaviour
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Dear All
 
I am trying to write test data to a text file and setting the write formats like this
 
write formats studentid (f7.0)/
    gender rform rv01 to rv36 rc001 to rc160 (a1)/
    wgt (f5.0).
 
When I run the syntax interactively it works fine.  When I run it via the production facility I get the following error message
 
Warning # 4837 on line 76 in column 5.  Text: Gender >The width of a string format must match the width of the string variable.  The >correct width has been substituted.
 
This is in spite of the fact that the variables are all a1 in the original system file from which they’re read.
 
Any thoughts?
 
Thanks
 
David
 
-------------------------------------------
 
Dr David Millar
Research Associate
Educational Research Centre
St Patrick's College
Dublin 9
 
Tel 01 8065226